Answer:
Think of it like this :
Total amount of nuts = no. of cashews + no. of peanuts + no. of walnuts
1 cashew = x
3 peanuts for every cashew, 3x is amount of peanuts
4 walnuts for every cashew, 4x is amount of walnuts
Therefore, total amount of nuts = x (no. of cashews) + 3x (no. of peanuts) + 4x (no. of walnuts
This simplifies to : total number of nuts = 8x