Let food needed by x kg of A, y kg of B and z kg of C. Therefore x kg of A contains 1 gram of nutrient P. So x kg of A will contain x grams of nutrient P Similarly, the amount of nutrient P in y kg of food B and z kg of food C are 3y and 4z grams respectively. So, total quantity of nutrient P in x kg of food A, y kg of food B and z kg of food C is x+ 3y + 4z gram.

x+3y+4z = 8

Similarly, 2x+y+2z = 5 and 5x+Y+z = 7

The above system of simultaneous linear equations can be written in matrix form as AX = B