plane is travelling in a straight horizontal line with velocity u

let v be the initial velocity of cannon mounted at angle x

resolving velocity we get its

horizontal component=vcos(x)

vertical component=vsin(x)

since cannon ball hit the plane we have

vcos(x)=u (this will remain constant) equation 1

since we have to calculate the minimum cannon ball velocity so the final vertical component of velocity of cannon ball will be 0

therefor

(vsin(x))^2=2gh equation 2

squaring and adding equation 1 and 2 we have

(vcos(x))^2+(vsin(x))^2=u^2+2gh

therefor

v^2=u^2+2gh

and finally

v=(u^2+2gh)^(1/2)