5. (10 points) Hao Hao has 22 candies, Yuan Yuan has 3 more than half of Hao Hao's candies, so Hao Hao gives Yuan Yuan $\qquad$ candies, then they will have the same number of candies.
【Answer】Solution: $22 \div 2+3=14$ (pieces)
$$
\begin{aligned}
& (22-14) \div 2 \\
= & 8 \div 2 \\
= & 4 \text { (pieces) }
\end{aligned}
$$

Answer: Hao Hao gives Yuan Yuan 4 pieces of candy, making their number of candies the same. Therefore, the answer is: 4.