To find out how much more protein Mary needs to eat, we can start by calculating how many grams of protein she has consumed based on the calories she has already eaten from protein.
Mary has eaten 152 calories of protein. Since protein provides 4 calories per gram, we can calculate the grams of protein she has consumed:
\[ \text{grams of protein consumed} = \frac{\text{calories consumed}}{\text{calories per gram}} = \frac{152 \text{ calories}}{4 \text{ calories/gram}} = 38 \text{ grams} \]
Now, we know that her goal is to eat at least 40 grams of protein each day. Therefore, we can calculate how much more protein she needs:
\[ \text{additional protein needed} = \text{goal} - \text{grams consumed} = 40 \text{ grams} - 38 \text{ grams} = 2 \text{ grams} \]
Thus, Mary needs to eat 2 more grams of protein to meet her goal.
The correct answer is B. 2 grams.