I need this asap so if you can help that would be amazing . I can boost the points to more than 50 comment if you want more...

Multiply the number amount of cartridges by the number of books and add that tot he number of cartridges by the number of magazines.:
This needs to be either less than or equal tot he total cartridges she wants to use
40B + 30M ≤ 300
Do the same with pages:
200B + 80M ≤ 1200