1. Let's try another example with two machines again! 🎉
**Box 1:**
Machine g:
🍪 🍪 🍪 🍪
(4 cookies)
Machine $g$ triples the number of cookies: $g(x) = 3x$
**Box 2:**
🍪 🍪 🍪 🍪
(4 cookies)
Machine f:
🍪 🍪 🍪 🍪 🍪 🍪 🍪 🍪 🍪 🍪 🍪 🍪 🍪
(12 cookies)
Machine $f$ subtracts 2 cookies: $f(x) = x - 2$
Step by step:
- Start with 4 cookies 🍪 🍪 🍪 🍪
- Put into $g$: $g(4) = 3 \times 4 = 12$ cookies 🍪 🍪 🍪 🍪 🍪 🍪 🍪 🍪 🍪 🍪 🍪 🍪
- Then put into $f$: $f(12) = 12 - 2 = 10$ cookies 🍪 🍪 🍪 🍪 🍪 🍪 🍪 🍪 🍪 🍪
So, $f(g(4)) = 10$.
Awesome! You put the cookies through two machines again! Keep going! 🚀🍪 🍪 🍪 🍪 🍪 🍪 🍪 🍪 🍪 🍪 🍪 🍪 🍪
(12 cookies)