Answer:
In 4 months the cost of both gyms will be the same.
Explanation:
At first we need to model the function to calculate the cost of the 2 gyms.
Slope-intercept equation of linear function
![f(x)=mx+b](https://img.qammunity.org/2020/formulas/mathematics/middle-school/6y17ezrpv7ir4zbcfli9dye6jyqxdod420.png)
where
slope of line
y-intercept
Let linear function to calculate total cost of gym be:
![c(n)=mn+b](https://img.qammunity.org/2020/formulas/mathematics/middle-school/8wl68f9khlj9ey8w4jepkj5cu9fdb3kb41.png)
where
total cost of gym
cost per month (slope)
number of months
start-up fee (y-intercept)
For Gym 1
,
![c(n)=20n+12](https://img.qammunity.org/2020/formulas/mathematics/middle-school/yazcwzhop0oul2klb7arkk6qzk2w4pi4aw.png)
For Gym 2
,
![c(n)=22n+4](https://img.qammunity.org/2020/formulas/mathematics/middle-school/3l56nnighf6aq97ppoxv629ipm8vye4f6a.png)
In order to find the number of months the cost of both gyms will be the same, we need to equate both functions and solve for number of months
![(n)](https://img.qammunity.org/2020/formulas/mathematics/middle-school/a1sub1x1jm2ghvln1ell446s3sewetdm6j.png)
![20n+12=22n+4](https://img.qammunity.org/2020/formulas/mathematics/middle-school/5th0ssjmwx93bw6e3cnv4vh74ls0b9k1ii.png)
![\\\textrm{Subtracting 22n from both sides}\\20n-22n+12=22n-22n+4\\-2n+12=4\\\textrm{Subtracting 12 from both sides}\\-2n+12-12=4-12\\-2n=-8\\\textrm{Dividing both sides by -2}\\(-2)/(-2)n=(-8)/(-2)\\n=4\textrm{ months}](https://img.qammunity.org/2020/formulas/mathematics/middle-school/7zf23wsy5iqo98k9yzwk7egdk8qlzambxa.png)
So,
In 4 months the cost of both gyms will be the same.