For this case, the first thing we must do is define variables.
We have then:
x: number of $ 10 coins
y: number of $ 20 coins
We now write the system of equations that models the problem:


The graphical solution (see attached image) is given by the intersection of the equations.
We have then:


Answer:
Dave has:
26 $ 10 coins
24 $ 20 coins