To solve this problem: y will represent the number of cookies, and x the number of hours.
To find the number of cookies that CJ eats per hour, we multiply 3 (since he eats 3 per hour) by x (the number of hours)
Since there we only 24 cookies left in the box, we will need to substract 3 by the number of hours that have passed, from 24 to find the number of cookies "y":
[tex]y=24-3(x-5)[/tex]This equation represents that the number of cookies "y" is equal to the 24 cookies that where left after 5 hours, and to that we substract 3 (which is the number of cookies per hour) by total number of hours that have passed since those 5 hours (x-5) because 5 hours that have already passed we substract them from x.
We need to simplify that equation to represent in slope-intercept form:
[tex]\begin{gathered} y=24-3x+15 \\ y=-3x+39 \end{gathered}[/tex]Now we need to determine the number of hours it would take to finish the cookies. So we are looking for the value of x, that makes y=0:
[tex]0=-3x+39[/tex]solving for the number of hours x:
[tex]\begin{gathered} -3x=-39 \\ x=-\frac{39}{(-3)} \\ x=13 \end{gathered}[/tex]It would take 13 hours for CJ to eat the entire box of cookies.