Scorching goIITian
Lets say the small mass is k,then m2=3k and total mass is ,m=4k,conserve momentum at top:
..then assume a projectile from this point and calculate the horizontal range R2..then add half of range of first+R2.