We can setup two different equations for the total cost of the gym for each month.
1) For $150 oining fee and $10 monthly fee, we can make
y=150+10x ......................equation (1)
where x is the number of months and y is the total cost.
2) For $50 oining fee and $30 monthly fee, we can make
y=50+30x ......................equation (2)
We need to find the number of months when cumulative costs of the plans be equal.
So, we need to set both equations equal and solve for x.
50+30x = 150+10x
Subtracting 50 from both sides, we get
50-50+30x = 150-50+10x
30x = 100 +10x.
Subtracting 10 from both sides, we get
30x-10x = 100 +10x-10x.
20x = 100
Dividing both sides by 20, we get
20x/20 = 100/20
x=5.
Plugging x=5 in first equation, we get
y=150+10(5) = 150+50 =$200.
Therefore, after 5 month the cumulative costs of the plans be equal and those total costs be will be $200.