A target lies a distance R = 1100 m from a cannon across level ground, and a distance d = 780 m behind a wall h = 400 m tall. If the cannon shoots projectiles with speed 160 m/s, at what angle should the cannon fire so as to hit the target over the wall?

You know that

y = -g/(2(vcosθ)^2) x^2 + tanθ x
y = -4.9/(160 cosθ)^2 x^2 + tanθ x
You know that you need
y(1100) = 0
so θ = 12.5° or 77.5°
If we use 12.5°, y(320) = 50
and we need it to be 400
So, if we use 77.5°, y(320) = 1026
So that will work nicely.