We have to write an equation for each gym of the cost as a function of the months, so:
[tex]\begin{gathered} We\text{ call c=the total cost and m=months.} \\ \text{For Flex Gym:} \\ c_F=41\cdot m+150 \\ \text{For Able Gym}\colon \\ c_A=46\cdot m+120 \end{gathered}[/tex]Now, we want to find the number of months at which the both gym have the same cost, so:
[tex]\begin{gathered} c_F=c_A \\ 41\cdot m+150=46\cdot m+120 \\ 150-120=46\cdot m-41\cdot m \\ 30=5\cdot m \\ m=\frac{30}{5}=6 \end{gathered}[/tex]At 6 months the cost of the both gyms is the same.