A) To get the answer to a you would put the amount of green apples 5 to the total amount of apples which you can find by adding 5 and 8. So you would get 5:13!
B) To get the answer to be you would again add all the number which is 8 and 5 to get 13. Then you would put the to the amount of red so you would get 8. So you would get 13:8!
Anymore questions let me know!