Answer :
Just decompose the speed into horisontal speed (remains constant) and vertical speed (decelerated by g). You could then find out how far it goes, assuming the ball starts from ground level -- find out when does the ball get back to ground level in the vertical one and multiply the time by the horisontal speed.