We know that the blue boxes cost $42 and that the orange boxes cost $52; we also want to make $350 then we have the equation:
We also know that we make the blue boxes with 8 pom-poms and the orange boxes with 4 pom-poms and that we only have 40 boxes, then we have the equation:
Hence we have the system of equations:
Comparing it with the options given we conclude that the correct option is the last one.