Hey anyone viewing this, I need help with a word problems they have to be my worst subject considering I ask to much questions on them but I was reading ASVAB AFQT for dummies and stumbled upon a question that got me wondering 'how'd he get that'. Here's the question.

"Jeremy has 12 more nickels than quarters. How many coins does he have if the total value ofhis coins is $2.70"

Let q = quarters. Because Jeremy has 12 more nickels than quarters, this could be represented

as q + 12. Jeremy has $2.70 worth of coins, which is equal to 270˘. A quarter is 25˘,

and a nickel is 5˘. Jeremy’s total coins together must equal 270˘. Therefore:

(25˘ × number of quarters) + (5˘ × number of nickels) = 270˘

Or, writing it another way:

25q + 5(q + 12) = 270

I understand some of this but not all of it. Now the part that got me wondering is the formula.

25q+5(q+12)=270. How did he get the 5(q+12). How did he even know how to set the formula like that?

What goes where?

Thanks a bunch, please no rude comments if he stated it in the explanation.