0.6 seconds after the balls start moving, they'll be at the same height.
The altitude the 1st ball will be at time T is
a = 25T - 0.5AT^2
The altitude the 2nd ball will be at time T is
a = 15 - 0.5AT^2
Set both expressions equal to each other and solve for T
25T - 0.5AT^2 = 15 - 0.5AT^2
Add 0.5AT^2 to both sides
25T = 15
Divide both sides by 25
T = 15/25 = 3/5 = 0.6
So both balls will be at the same altitude 0.6 seconds after they start moving.
Let's verify those results. Assume A = 9.8 m/s^2
0.5 * 9.8 m/s^2 * 0.6s^2
= 4.9 m/s^2 * .36 s^2
= 1.764 m
The altitude the 1st ball will be at after 0.6 seconds is
0.6 s * 25 m/s - 1.764m
= 15 m - 1.764 m
The altitude the 2nd ball will be at after 0.6 seconds is
15 m - 1.764 m
Both are the same value so the answer is verified.