Let Q be the number of quarters.
Then the number of nickels is (38-Q).
Quarters contribute 25Q cents to the total.
Nickels contribute 5*(38-Q) cents to the total.
The "value" equation is
25Q + 5*(38-Q) = 510 cents.
25Q + 190 -5Q = 510,
20Q = 510 - 190 ---> 20Q = 320 ---> Q = = 16.
Answer. 16 quarters (= $4.00) and 38-16 = 22 nickels (= $1.10).
You will find there the lessons for all levels - from introductory to advanced,
and for all methods used - from one equation to two equations and even without equations.
Read them and become an expert in solution of coin problems.