Two particles A and B are projected simultaneously from two towers of height 10 m and 20 m

Two particles $$A$$ and $$B$$ are projected simultaneously form the two towers of height $$10\ m$$ and $$20 m$$ respectively. Particle $$A$$ is projected with an initial speed of $$\displaystyle 10\sqrt{2}$$ at an angle at $$\displaystyle 45^{\circ}$$ with horizontal, while particle $$B$$ is projected horizontally with speed $$10\ m/s$$. If they collide in air, what is the distance d between the towers?

Two particles A and B are projected simultaneously from two towers of height 10 m and 20 m
The height of particle A at any instant $$t$$ is given as,

$$h_A = 10+u_Asin45^0t-\dfrac{1}{2}gt^2$$

$$h_A = 10+10\sqrt{2}sin45^0t-\dfrac{1}{2}gt^2= 10+10t-\dfrac{1}{2}gt^2$$

Similarly, height of particle B at any instant $$t$$ is given as,

$$h_B  = 20-\dfrac{1}{2}gt^2$$

At collision, both the heights are equal.

$$\therefore\ 10+10t-\dfrac{1}{2}gt^2 = 20-\dfrac{1}{2}gt^2\implies t=1s$$

Horizontal distance moved by particle A in 1 second is, 

$$x_A =u_A\cos 45^o \times t= 10\sqrt{2}cos45^0\times1=10m$$ 

Horizontal distance moved by particle B in 1 second is, 

$$x_B =u_B\times t= 10\times1=10m$$

$$\therefore\ d=x_A+x_B=10m+10m=20m$$