In the problem we are given that:
Westside Community College
Class fees = $98 per credit hour
Amount of credit hours = w
Pinewood Community College
Class fees = $115 per credit hour
Amount of credit hours = 19 - w
Therefore the combined total dollar Bob is paying is:
Total payment = 98 * w + 115 * (19 – w)
Total payment = 98 w + 2,185 – 115 w
Total payment = 2,185 – 17 w