Let n be the number of nickels and q be the number of quarters.
We have two equations:
(1) n + q = 24
(2) 0.05n + 0.25q = 3
Rearrange (1) to solve for n in terms of q for another equation (3)
(3) n = 24 - q
Plug (3) into (2)
0.05(24 - q) + 0.25q = 3
Multiply through:
1.2 - 0.05q + 0.25q = 3
Combine q terms
0.2q + 1.2 = 3
Subtract 1.2 from each side:
0.2q = 1.8
Divide each side by 0.2
q = 9
We have two equations:
(1) n + q = 24
(2) 0.05n + 0.25q = 3
Rearrange (1) to solve for n in terms of q for another equation (3)
(3) n = 24 - q
Plug (3) into (2)
0.05(24 - q) + 0.25q = 3
Multiply through:
1.2 - 0.05q + 0.25q = 3
Combine q terms
0.2q + 1.2 = 3
Subtract 1.2 from each side:
0.2q = 1.8
Divide each side by 0.2
q = 9