figure is attached below.......
x = u1 cos# . t --------------------------1
x = u2 cos @ .t -------------------------2
so , u1 cos# = u2 cos@ --------------------------------------------------1
now y = u1sin# t. + 1/2gt^2
also y = u2sin@ t - 1/2 gt^2
adding above two eqns. we get
2y = t( u1 sin# + u2 sin@)
using 1 & 2 (eqns.)
2y = x tan# + x tan@
hence req. answer is:-
2y = x ( tan # + tan@)
note:- # is
& @ is 
if i have taken the angles in wrong away then i think u can interpret urself.....
hope it helps!!!!