Question 12317
Let us suppose he gets p Kg of A and q Kg of B
So he gets {4}x p of sulphur & {5}x p kg of nitro from A AND
   he gets {7}x q of Sulphur & {6}x q Kg of nitro from B
Total sulphur is 4p + 7q  and total nitro is 5p + 6q
But acc to ques total sulphur is 308 and total notro is 330 SO we have 2 eqns and two variables to solve . So the ques is done and only calculations remain

4p + 7q = 308 and 5p + 6q = 330

multiplying 1st eqn by 5 on both sides and 2nd by 4 on both sides we get
20p + 35q = 1540 & 20p + 24q = 1320
subtracting the two eqns 11q = 220 thus q = 20
substituting q in 1st eqn we get p  = 42