Answer:
initialvelocity  Vo = √[4 go R S / (R + S) ]
Explanation:
As in this problem the acceleration is not constant we must use the basic formula of the acceleration of a body
   a = dv / dt
We use the L’hospital chain rule
   a = dv/dy  dy / dt
   a = dv/dy  v
   v dv = a dy
We replace and integrate
   ∫ vdv = -go ∫ [R² / (R + Y)²  dy
   ½ V² = -go R² [-2 / (R + y)]
We evaluate the integral you enter its lower limit with the velocity equal to Vo for when it is at ground level (y = 0) and the end point for when it has zero velocity (Vf = 0) for a height S (y = S), let's calculate
   ½ (0- Vo²) = 2 go R² [1 / (R + S) - 1 / (R + 0)]
   Vo² = 4 or R² [-S / (R + S) R]
   Vo² = 4 go R S / (R + S)
   Vo = √[4 go R S / (R + S) ]