tcs - 4 equal aged boys and 6 equal aged girls were regularly attending a guitar class 22 is the average age of all and 56 is the age of two boys and three girls after 3 years a boy is replaced by a new boy aged 15 now what will be the average age of boys - skillgun

Assume the age of a boy and a girl are x and y respectively.
Given that 22 is the average age of all.
Then 4x/4 + 6y/6 = 22
i.e., x + y = 22
Also given that, 56 is the age of two boys and three girls.
Then, 2x + 3y = 56
then we get x=10, y=12.
That is,age of each boy is 10 and age of each girl is 12.
After 3 years, 1 among 4 boys leaves the group but replaced by a new 15 years old boy.
Sum of ages of 3 left over boys + new boy = Ages of original 3 boys after 3 years + Age of new boy = 3(x+3) + 15 = 3x13 + 15 = 54 years.
Their average age = Total Age / 4 = 54/4 = 13.5 years.