Let ##d## be the distance between A and B when B hits the ground. For a given ##v_1## find ##v_2## such that ##d## is minimised.
What is the expression of "d" before minimization?
Check how you got the h/g at the end of this:
##H=v_1t-gt^2/2=v_1√(2h/g)-h/g##.
I used the time obtained for the body from B to touch the ground and using the law of uniform rectilinear motion:H=v1t-gt^2/2=v1√(2h/g)-g[√(2h/g)]^2/2=v1√(2h/g)-g(2h/g)/2=v1√(2h/g)-h
Ahh, I was wrong the first time
##v_1√(2h/g)-h/g## cannot be right. The left hand term is a distance, the right hand term is time2.
Similarly I see terms (hg-h) later, which make no sense. You should always check for dimensional consistency.It is squared because L ^ 2 = l ^ 2-2l√ (2h / g) v2 + (2hv2 ^ 2 + 2hv1 ^ 2) / g +...
During t the body from A climbs: H=v1t-gt^2/2=v1√(2h/g)-h/g.
So the height at which the body in A when the one in B reaches the ground is H'=H+h=v1√(2h/g)-h/g+h=v1√(2h/g)+(-h+hg)/g.
The horizontal distance between the bodies at this time is D=l-d=l-v2√(2h/g).
Now we apply the Pythagorean Theorem...