5. Petya and Vasya made 5 shots each in the shooting range. With their first three shots, they scored the same number of points, and with the last three shots, Petya scored three times more points than Vasya. The targets have bullet holes worth $10,9,9,8,8,5,4,4,3,2$ points. Where did each of them hit with their third shot? Provide all possible answers and prove that there are no others.
Solution. With the last three shots, Vasya could not score more than 9 points (otherwise, Petya would have scored no less than 30 with his last three shots). Vasya also could not score less than 9 points, as the smallest sum for three shots is $2+3+4=9$. Therefore, Vasya scored 2, 3, and 4 points, while Petya scored 10, 9, and 8 points (there are no other options for scoring 27 points with three shots). This means that with their first two shots, the boys scored 9, 8, 5, and 4 points. At the same time, Petya's third shot was no less than 8, and Vasya's was no more than 4 points. Since the total score after the first three shots was equal, Petya must have scored at least four points less with his first two shots compared to Vasya. The only possibility is that Vasya scored 9 and 8, while Petya scored 5 and 4 points, meaning that with the third shot, Vasya scored 2, and Petya scored 10 points.

Answer: with the third shot, Petya scored 10, and Vasya scored 2 points.