It depends how many days you'ill watch the dog, but let's suppose you watch the dog for a week, Your friend #1 will pay you $10 + 2 Per day (10 + 2x = Y) and friend #2 will pay you $15 plus 1 per day ( 15 + 1x = y)
So a week has 7 days so you plug in 7 in "x"
Friend #1 = 10 + 2(7) = 24
Friend #2 = 15 + 1(7) = 22
I'll take friend #1 offer because it pays you more than friend #2.
Hope this answer helps!