Let us assume that the number of classes is x and the total fee is y
In the Fitness works, there is a monthly fee of $20 and $5 per class, then
The total fee y = 20 + 5(x), then
y = 20 + 5x ------ (1)
In the Gym-tastic, there is a monthly fee of $100 for unlimited classes, then
y = 100 ------- (2)
Equate (1) and (2)
20 + 5x = 100
Subtract 20 from both sides
20 - 20 + 5x = 100 - 20
5x = 80
Divide both sides by 5 to find x
x = 16
The number of the classes is 16