Answer:
a) Let b represent the number of blue marbles placed in the second jar. Then 34-b is the number of yellow marbles in the second jar, and 25 - (34-b) is the number of yellow marbles remaining in the first jar. That value simplifies to b-9. The positive difference between b and (b-9) is 9.
b) Let n, d, p represent the numbers of nickels, dimes, and pennies, respectively.
.. (5n + 10d + p)/(n + d + p) = 7 ... the average value of the collection is 7 cents per coin
.. (5(n-1) + 10d + (p+5))/((n-1) + d + (p+5)) = 6 ... replacing one nickel with pennies changes the average to 6 cents per coin
Multiplying by the denominator and subtracting the right side of each resulting equation gives
.. 10d + 5n + p = 7d + 7n + 7p
.. 10d + 5n + p = 6d + 6n + 6p + 24
Subtracting the second equation from the first gives
.. 0 = d + n + p - 24 ... tells us the total number of coins is 24. This tells us the total value is $1.68 = 24*$0.07.
This sum will consist of at least 3 pennies. If that is all the pennies, then the remaining 21 nickels and dimes must add to $1.65. If all were nickels, the value of the 21 coins would be $1.05. We have $0.60 more than that. For each nickel traded for a dime, we gain $.05, so 12 of the 21 nickels must be traded for dimes to raise the total coin value to $1.65.
Alternatively, you can write two equations in the two unknowns:
.. d + n = 21
.. 10d + 5n = 165
Subtracting 5 times the first equation from the second gives
.. 5d = 60 ... which gives the same answer as reasoned above.
There are 3 pennies, 9 nickels, 12 dimes. (If there are 8 pennies to start, then the number of nickels is zero, so it is impossible to trade one for 5 pennies. The solution shown is the only one.)