Some confusing notation here that buries the assumption that the rate of change is constant (which is true in this case). For conceptual clarity I would explain it as:
Let y(t) be the boy’s position at time t, and x(t) the girl’s position. The distance between them is S = sqrt(x^(2) + y^(2)). The distance is changing at a rate of dS/dt = dS/dx dx/dt + dS/dy dy/dt = (xdx/dt + ydy/dt)/sqrt(x^(2) + y^(2)). We are given dy/dt = 5 and dx/dt = 1, and we can determine that at t=5 we have y = 25 and x = 5. Therefore dS/dt = 130/sqrt(650) = sqrt(26) ~= 5.1.








The implication that the boy is strafing while maintaining a straight vertical line to the girl is hilarious