Data:
Thomas: T
Janine: J
number of years: y
number of spin class: s
You multiply the number of years y per the amount of the yearly fee gym membership and the number of spin class s per the cost of one class.
Then, for Thomas (T) you get the equation:
For Janine you get the equation: