let the number of quarters = x , and the number of nickels = y
quarter = $0.25 and nickel = $0.05
So, x + y = 58
x = 58 - y
and 0.25 x + 0.05 y = 7.5
so,
0.25 (58 - y) + 0.05 = 7.5
14.5 - 0.25 y + 0.05 y = 7.5
-0.2 y = -7
y = -7/-0.2 = 35
x = 58 - 35 = 23
So, the number of quarters = 23 and the number of nickels = 35