a rifle is aimed so that the target sitting on a 50.0 m high cliff, 300.0 m away, can be hit by a bullet. The rifle is aimed upward at an angle of 40.0* above the horizontal. With what speed must the bullet exit the muzzle of the rifle so that the target will be hit?

speed = s

horizontal speed = u = s cos 40
u T = s cos 40 T = 300 where T is total flight time

Vi = initial vertical speed = s sin 40
v = s sin 40 - 9.81 t
h = 0 + s sin 40 t - 4.9 t^2
at time T, h = 50
50 = s sin 40 T - 4.9 T^2
so two equations in s and T:
s cos 40 T = 300
and
50 = s sin 40 T - 4.9 T^2

substitute and solve