see the attached file,
APB = sqrrt (a2 + x2) + sqrrt (b2 + (c-x)2 )
for APB be to be minimum, the first derivative of the above expression = 0
differentitating it wrt x, nd then equating it to 0, we have
x sqrrt (b2 + (c-x)2 ) =- (c-x) sqrrt (a2 + x2)
solving the above, finally we'll have
b2 / (c-x)2 = a2 / x2
=> x = ac/ (a+b)