Hi John! You can solve this problem by writing out two systems of equations.
Let's call the costs of the two different gyms y and x. We know gym y has a $160 fee and costs $30 per month. As an equation, that would look like this:
y = $160 + $30(month).
The equation for the cost of gym x is similar, except it has no joining fee and costs $70 per month. That means
x = $0 + $70(month).
To make our equations easier to solve, let's just write the month as m. We then get:
y = 160 + 30 m
x = 70m
We want to know when the two gyms (x and y) cost the same! That means y = x. To figure out out the month, we just set the equations equal to each other and solve.
160 + 30m = 70m
160 = 40m
m = 4.
This means the costs are equal in the fourth month.
But what is this amount? We can plug m = 4 back into either equation to figure this out.
x = 70m
x = (70)(4)
x = $280.
Hope this helped!