Information we have:
The maximun we have to buy the cars is 30.
We need to have at least 10 left after we buy the cars.
Each pack of cards costs 5.
The cost to buy "x" amount of cards will be x multiplied by the cost of each pack of cards:
And since we know that this cost must be less