Concept:
Two vectors are in the same direction if their slopes are equal.
Velocity components for projectile motion are:
\[
v_x=u\cos\theta
\]
\[
v_y=u\sin\theta-gt
\]
Step 1: Find velocity components of first body.
Given:
\[
u_1=15\sqrt3,\qquad \theta_1=60^\circ
\]
Horizontal velocity:
\[
v_{1x}=15\sqrt3 \times \frac12
\]
\[
=\frac{15\sqrt3}{2}
\]
Vertical velocity:
\[
v_{1y}=15\sqrt3\left(\frac{\sqrt3}{2}\right)-10t
\]
\[
=\frac{45}{2}-10t
\]
Step 2: Find velocity components of second body.
Given:
\[
u_2=40,\qquad \theta_2=30^\circ
\]
Horizontal velocity:
\[
v_{2x}=40\cos30^\circ
\]
\[
=20\sqrt3
\]
Vertical velocity:
\[
v_{2y}=40\sin30^\circ-10t
\]
\[
=20-10t
\]
Step 3: Equate slopes of velocity vectors.
\[
\frac{v_{1y}}{v_{1x}}
=
\frac{v_{2y}}{v_{2x}}
\]
\[
\frac{\frac{45}{2}-10t}{\frac{15\sqrt3}{2}}
=
\frac{20-10t}{20\sqrt3}
\]
Cross multiplying:
\[
20\left(\frac{45}{2}-10t\right)
=
15(20-10t)
\]
\[
450-200t
=
300-150t
\]
\[
150=50t
\]
\[
t=3
\]
Checking carefully with simplification:
\[
\frac{45-20t}{15\sqrt3}
=
\frac{20-10t}{20\sqrt3}
\]
\[
20(45-20t)=15(20-10t)
\]
\[
900-400t=300-150t
\]
\[
600=250t
\]
\[
t=2.4\,\text{s}
\]
Hence,
\[
\boxed{2.4\,\text{s}}
\]