Set up equations for each gym.
multiply daily cost by number of days(x) and add the fee:
Muscle max: 2x + 30
Capital: 4x + 10
Now set them
Equal to each other and solve for x:
2x + 30 = 4x + 10
Subtract 2x from both sides :
30 = 2x + 10
Subtract 10 from both sides :
20 = 2x
Divide both sides by 2:
X = 10
It will take 10 days