Each nickel is worth 5 cents, and each quarter is worth 25 cents.
So, if we have 12 nickels, we can multiply this value by 5 to get its value in cents:

Similarly, if we have 4 quarters, we can multiply this value by 25 to get its value in cents:

So, in total, we have:

So, for 12 nickels and 4 quarter, we have the value of 160 cents.
We can do this generally by setting the values of nickel and quarter to x and y.
If we have x nickels and each one is worth 5 cents, we have the value:

And if we have y quarters and each is worth 25 cents, we have the value:

So, in total, we have:

So, for x nickels and y quarter, we have the value of 5x + 25y cents.