Start by making a formula for the price of each gym:
Powerhouse has a $100 entry fee, the constant, leaving $35 to go with your variable. Lets say m, which gives you the equation:
100 + 30m
Repeat the same thing for Megamuscle gym and you have the equation:
50 + 35m
Insert numbers for m (number of months) from 1 - 12 until you get a number for Lisa that is larger than Kelly's, which would be 11 months.
Kelly would have paid $430, with Lisa paying $435 in 11 months.