The answers are 2.4 hours and 20 hours
The equation you have is correct. To solve the next ones you use that equation and plug in the number of hours given. So for 31 hours of babysitting you’d do this:
12(32)+15c=420
384+15c=420
15c=36
c=2.4
Same thing for 10 hours babysitting
12(10)+15c=420
120+15c=420
15c=300
c=20