Let, the number of $20 bill = x
number of $50 bill = y
Equations would be: x + y = 18
& 20x + 50y = 450
Substitute value of x from 1st equation into 2nd equation;
20(18-y) + 50y = 450
360-20y + 50y = 450
30y = 450-360
y = 90/30
y = 3
Now, Substitute value of y in 1st equation,
x + 3 = 18
x = 18 - 3 = 15
So, There were 15 bills of $20 and 3 bills of $50
Hope this helps!