To solve this problem first you need to find the GCF or greatest common factor. Now you can put 5 chocolate chip cookies in each group, 3 peanut butter, and 4 sugar cookies. These are all relatively prime so that would be your final answer.
Since patient A gets three times more, 50 times 3 is 150. 150 plus 50 is 200, therefore, patient A gets 150 mg and patient B gets 50 mg. I hope this helps :)