Let "c" represent the amount of cashews they each bought.
Let "p" represent the amount of peanuts they each bought.
Mike: 2c + 1.5p = 26
Jim: 2.5c + 1 p = 29
That's the system you need to solve. We can do this with substitution.
Start with Jim:
2.5c + p = 29
p = 29 - 2.5c
Substitute that into Mike and solve for c:
2c + 1.5p = 26
2c + 1.5(29 - 2.5c) = 26
2c + 43.5 - 3.75c = 26
-1.75c + 43.5 = 26
-1.75c = - 17.5
c = 10
Now substitute that back into Jim's last equation:
p = 29 - 2.5c
p = 29 - 2.5(10)
p = 29 - 25
p = 4
So they each bought 10 pounds of cashews and 4 pounds of peanuts.