For the word problem below, there are 4 variables to solve for, but I can only identify 3 equations given the data. Through trial and error, you can easily figure out the answer, but I am wondering if there is an implied equation I'm not seeing. In other words, how can this problem be solved using algebra rather than a bit of trial and error?
Problem
Ian has been saving money for his summer trip to his grandparents' house. He has saved 18 bills of varying denominations, including \$20s, \$10s, \$5s, \$1s. He's saved a total of \$126. He has the same number of \$10s as he has \$1s. How many of each bill does Ian have?
Equations
w + x + y + z = 18
w + 5x + 10y + 20z = 126
w = y
[legend // w: number $1s, x: number of $5s, y: number of $10s, z: number of $20s]
Answer
$1s: 6
$5s: 4
$10s: 6
$20s: 2