I don't understand how to do a certain equation i have no clue what its called

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
[tex]24-x[/tex]and since we are calling this amount left y, we can say
[tex]y=24-x[/tex]which is our answer!
When Mr Ledger uses 18 donuts, the number left will be
[tex]\begin{gathered} y=24-18, \\ y=6. \end{gathered}[/tex]And when Mr Ledger uses 22 donuts, we will have left
[tex]\begin{gathered} y=24-22, \\ y=2. \end{gathered}[/tex]donuts.
The graph of the two points is given below.