Given:
Alfred has nine times as many cookies as Jerry
Let Jerry has a number of cookies = x
So, Alfred will have the number of cookies = 9x
Together, they have forty cookies
So, x + 9x = 40
Solve for x
The number of cookies of Alfred = 36
The number of cookies of Jerry = 4