The recipe yields:
[tex]24\cdot350=8400[/tex]8400 calories in total.
Those 8400 calories are equally divided into 40 mini-cupcakes. Then, each mini-cupcake has
[tex]\frac{8400}{40}=210[/tex]210 calories for each mini-cupcake.
Therefore, 4 mini-cupcakes contain:
[tex]210\cdot4=840[/tex]The answer is 840 calories