Hi,
Let x be John's Age, then Maria's age is (3/4)x and Linda's is (7/5)x
according to othe ratios given. for ex. J/M = 4/3 then 4M = 3J or M =3/4J
the sum of ages of three friends is given as 126
x + (3/4)x + (7/5)x = 126
Multiplying thru with 20 to clear the denominators
20x + 15x + 28x = 126*20
63x = 2520
x = 40
John is 40 years old
checking our answer
Maria is 30 and Linda is 56
40 + 30 + 56 = 126