If you're trying to find the missing side of the "triangle" (the distance from the house to where the ladder touches the ground), you would use the pythagorean theorem, a²+b²=c². (c is always hypotenuse)
Since you are trying to find time, represented by t, you set the equation equal to t. Then you need to add n multiplied by miles, m, to the fixed rate, r.