Stella's equation is given by
[tex]y=\frac{0.5}{40}x+100[/tex]where x represents the miles, y the total cost and 100 is the flat rate.
Now, since the maximun amount of money is $270, we need to find x in our formula. that is,
[tex]270=\frac{0.5}{40}x+100[/tex]Then, by moving 100 to the left hand side, we get
[tex]\begin{gathered} 270-100=0.5x \\ 170=0.5x \end{gathered}[/tex]then x is given by
[tex]\begin{gathered} x=\frac{170}{0.5} \\ x=340 \end{gathered}[/tex]so, the greatest number of miles is 340 miles