Consider a class with $4$ students having min goals as $\big\{ 1, 3, 4, 5 \big\} $ and max goals as $\big\{ 2, 5, 8, 6 \big\}$.
Find the best way to divide the class in such a way that the match is competitive i.e. the maximum difference between goals scored by the team is minimised.
My solution: After taking the average of the minimum goals and the average of the maximum goals I got the answer as $4$, which is the minimum difference between the teams, but the answer in the puzzle is $6$.
Please tell me where I went wrong.
Your problem is that you have shown that the minimum difference would be at least $4$, but you have not shown $4$ is actually obtainable.
And in fact $4$ is not obtainable, so is $5$. Essentially this problem only has three possible team divisions $(a,b)(c,d)$ and $(a,c)(b,d)$ and $(a,d)(b,c)$ so listing them out would be the easiest solution.