Answers:
He has 27 quarters and 31 dimes
=========================================================
Work Shown:
d = number of dimes
q = number of quarters
d+q = 58 since there are 58 coins of only these two types
d = 58-q
10d+25q = 985 .... note that 985 cents is $9.85
10(58-q)+25q = 985 .... replace d with 58-q
580-10q+25q = 985
15q+580 = 985
15q = 985-580
15q = 405
q = 405/15
q = 27 ..... Mike has 27 quarters
d = 58-q
d = 58-27
d = 31 .... Mike also has 31 dimes
-----------
As a way to check:
d+q = 31+27 = 58 so that works out
and
10d+25q = 10*31+25*27 = 310+675 = 985
so that works out as well. The answer is confirmed.