Dear student,
There are 30 notes in total.
So we take x to be number of 20 rupees notes and (30-x) to be the number of 10 rupees notes.
Now total amount is 500.
we get:
[20×x]+[(30-x)×10]= 500
= 20x+[300-10x]= 500
= 20x-10x+300= 500
= 10x= 500-300
= 10x= 200
= x= 20.
So there are 20, 20rupee notes and (30-20)= 10 , 10 rupees notes.
Thank you