if there are 40 cookies all together and A takes 10 and B takes 5 how many are left