Answer:
9 bags pf spinach, 6 bags of carrots
Explanation:
x bags of spinach, y bags of carrots,
x + y = 15 (1)
weight of spinach = 5 * x, weight of carrots = 7 * x
5x + 7y = 87 (2)
From (1) y = 15 - x
Sub it into (2):
5x + 7(15 - x) = 87
5x + 105 - 7x = 87
2x = 105 - 87 = 18
x = 9
y = 15 - x = 15 - 9 = 6
So 9 bags pf spinach, 6 bags of carrots.