so n=number of nickles
d=number of dimes
n is 12 more than d so
n=12+d
but they have same amount of money so
n times 5=worth of nickles
d times 10=worth of dimes
5n=10d
divide both sides by 5
n=2d
subsitute
n=2d
n=12+d
2d=n=12+d
2d=12+d
subtract d from both sides
d=12
subsitute
n=12+d
n=12+12
n=24
24 nickles
12 dimes