Let’s see if this helps you understand the principles better.

We give variable names to the numbers of nickels and dimes. Let’s use the letters n and d.

We know there are 21 coins so n+d=21.

How much are n nickels worth? 5n cents. And d dimes are with 10d cents. So 5n+10d=165 cents after we have converted $1.65 into cents.

From the first equation we can write n=21-d. That means we can write the second equation in terms of just variable, and then it will be easy to solve.

So where we have n we put (21-d): 5(21-d)+10d=165.

Now we expand the brackets: 105-5d+10d=165.

We can combine the d terms: 105+5d=165.

Now we collect the variable on one side of the equals and the numbers on the other side:

5d=165-105=60, so 5d=60, so d=60/5=12. We now know that n=21-12=9.

So 12 dimes and 9 nickels make up the amount.

Let’s check: 12 dimes is $1.20 plus 9 nickels (45 cents) make $1.65.