Tom has $168. He has nine $2 bills and as many $5 bills as $10 bills. How many $5 bills does he have?

So if he has x fives and tens,

9*2 + (5+10)x = 168