For the second one:
Let:
r = revenue
p = price charged per student
n = number of students enrolled in the class
Hopefully it is intuitive that revenue is a function of price and enrollment:
Code
r = p * n
We can also express the number of students enrolled as a function of price.
Code
n = 60 + 10 ((28 - p)/2)
where (28-p) / 2 represents the number of decrease by $2
Substituting:
Code
r = p (60 + 10 ((28 - p)/2))
Expanding:
Code
200p -5p^2
To find the maximum: Take the first derviative of the above expression and set it equal to 0.
Code
200 - 10p = 0
p = 20
If you don't undestand the derivative bit, you can always graph the function to see how price and revenue are interacting.