Richard: 12 cookies
Meghan: 10 cookies
If Richard eats 4 cookies, then Meghan would eat half, or 2. So Richard would have 8 cookies, and Meghan would also have 8 cookies.
12 - x = 10 - x/2
If x = 4
12 - 4 = 10 - 4/2
8 = 8
Which confirms that Richard would have to eat 4 cookies for them to have the same amount.
I hope this helps! :)