extremum (20^2+x^2)^(1/2) + (40^2+(30-x)^2)^(1/2)