Answer:
y =24 -x
Explanation:
Mr Ledger has 24 donuts and if he uses x donuts then the amount he will have left will be

and since we are calling this amount left y, we can say

which is our answer!
When Mr Ledger uses 18 donuts, the number left will be

And when Mr Ledger uses 22 donuts, we will have left

donuts.
The graph of the two points is given below.