Total population of villages at the end of 2016
= (5x2 – 3y2) + (7y2 + 2xy) + (9x2 + 4xy)
= 5x2 + 9x2 – 3y2 + 7y2 + 2xy + 4xy
= 14x2 + 4y2 + 6xy …….(i)
Total number of persons who went to other village at the beginning of 2017
= (x2 + xy – y2) + (5xy) + (3x2 + xy)
= x2 + 3x2 – y2 + xy + 5xy + xy
= 4x2 – y2 + 7xy … (ii)
Remaining total population of villages = Total population at the end of 2016 – total number of persons who went to other village at the beginning of 2017
= 14x2 + 4y2 + 6xy – (4x2 – y2 + 7xy) … [From (i) and (ii)]
= 14x2 + 4y2 + 6xy – 4x2 + y2 – 7xy
= 14x2 – 4x2 + 4y2 + y2 + 6xy – 7xy = 1
= 10x2 + 5y2 – xy
∴ The remaining total population of the three villages is 10x2 + 5y2 – xy.