First, let's note that:
$X$ is given as a completely random number. B has no idea of what A's number could be at this time.
Also that:
The probabilities involved in choosing $1$ are the same involved in choosing $10$. The probabilities for $2$ are the same as for $9$. $3$ with $8$. $4$ with $7$. $5$ with $6$. So, we need to analyze only $5$ cases of the initial analysis of $X$ and the other five are symmetric.
We will need to evoke a concept:
Expected value is the topic at statistics that will help us. The expected value of a variable $M$ is represented as $E(M)$. In this problem, we are looking for $E(U + V)$, which is the value that we want to minimize.
Let's start with 1:
If $X = 1$, then each value in $[0, 9]$ has $10\%$ of probability of being $U$. Make $Y = X + U$ and then $V = 0$. The error is then $U$. Since each value of the interval $[0, 9]$ has $10\%$ of probability of being $U$ (and also $U + V$), then:
$$\begin{array}{rl} E(U + V) = & (10\% \times 0) + (10\% \times 1) + (10\% \times 2) + (10\% \times 3) + (10\% \times 4) + \\ & (10\% \times 5) + (10\% \times 6) + (10\% \times 7) + (10\% \times 8) + (10\% \times 9) \\ = & 10\% \times (0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9) \\ = & 10\% \times 45 \\ = & 4.5 \end{array}$$
The same reasoning could be applied for $X = 10$, but using $Y = X - U$ instead of $Y = X + U$.
Now, 2:
If $X = 2$, then each value in $[2, 8]$ has $10\%$ of probability of being $U$. $0$ also have $10\%$. $1$ has $20\%$.
If $U = 0$, that is great, Make $Y = X$ and then $V = 0$. This has $10\%$ of probability of happening. So $U + V = 0$ in $10\%$ of the cases.
If $U \ge 2$, fine. Make $Y = X + U$ and then $V = 0$. This has $70\%$ of probability of happening.
If $U = 1$, then we'll need to guess. $Y$ could either be $1$ or $3$. One will give us $U + V = 1$ and the other $U + V = 3$ with $10\%$ of probability for each one.
In the end, we have $20\%$ of probability of getting $U + V = 3$ and $10\%$ of probability of getting $U + V$ as any other value in the interval $[0, 8]$. So, the expected value is:
$$\begin{array}{rl} E(U + V) = & (10\% \times 0) + (10\% \times 1) + (10\% \times 2) + (20\% \times 3) + (10\% \times 4) + \\ & (10\% \times 5) + (10\% \times 6) + (10\% \times 7) + (10\% \times 8) \\ = & 10\% \times (0 + 1 + 2 + (2 \times 3) + 4 + 5 + 6 + 7 + 8) \\ = & 10\% \times (0 + 1 + 2 + 6 + 4 + 5 + 6 + 7 + 8) \\ = & 10\% \times 39 \\ = & 3.9 \end{array}$$
The same reasoning could be applied for $X = 9$, but using $Y = X - U$ instead of $Y = X + U$.
Now, 3:
If $X = 3$, then each value in $[3, 7]$ has $10\%$ of probability of being $U$. $0$ also have $10\%$. $1$ and $2$ have $20\%$ each.
If $U = 0$, that is great, Make $Y = X$ and then $V = 0$. This has $10\%$ of probability of happening. So $U + V = 0$ in $10\%$ of the cases.
If $U \ge 3$, fine. Make $Y = X + U$ and then $V = 0$. This has $50\%$ of probability of happening.
If $U = 1$, then we'll need to guess. $Y$ could either be $2$ or $4$. One will give us $U + V = 1$ and the other $U + V = 3$ with $10\%$ of probability for each one.
If $U = 2$, then we'll also need to guess. $Y$ could either be $1$ or $5$. One will give us $U + V = 2$ and the other $U + V = 6$ with $10\%$ of probability for each one.
In the end, we have $20\%$ of probability of getting $U + V = 3$, $20\%$ of probability of getting $U + V = 6$ and $10\%$ of probability of getting $U + V$ as any other value in the interval $[0, 7]$. So, the expected value is:
$$\begin{array}{rl} E(U + V) = & (10\% \times 0) + (10\% \times 1) + (10\% \times 2) + (20\% \times 3) + \\ & (10\% \times 4) + (10\% \times 5) + (20\% \times 6) + (10\% \times 7) \\ = & 10\% \times (0 + 1 + 2 + (2 \times 3) + 4 + 5 + (2 \times 6) + 7) \\ = & 10\% \times (0 + 1 + 2 + 6 + 4 + 5 + 12 + 7) \\ = & 10\% \times 37 \\ = & 3.7 \end{array}$$
The same reasoning could be applied for $X = 8$, but using $Y = X - U$ instead of $Y = X + U$.
Now, 4:
If $X = 4$, then each value in $[1, 3]$ has $20\%$ and each value in $[4, 6]$ has $10\%$ of probability of being $U$. $0$ also have $10\%$.
If $U = 0$, that is great, Make $Y = X$ and then $V = 0$. This has $10\%$ of probability of happening. So $U + V = 0$ in $10\%$ of the cases.
If $U \ge 4$, fine. Make $Y = X + U$ and then $V = 0$. This has $30\%$ of probability of happening.
If $U = 1$, then we'll need to guess. $Y$ could either be $3$ or $5$. One will give us $U + V = 1$ and the other $U + V = 3$ with $10\%$ of probability for each one.
If $U = 2$, then we'll also need to guess. $Y$ could either be $2$ or $6$. One will give us $U + V = 2$ and the other $U + V = 6$ with $10\%$ of probability for each one.
If $U = 3$, then we'll once again will need to guess. $Y$ could either be $1$ or $7$. One will give us $U + V = 3$ and the other $U + V = 9$ with $10\%$ of probability for each one.
In the end, we have $20\%$ of probability of getting $U + V = 3$, $20\%$ of probability of getting $U + V = 6$ and $10\%$ of probability of getting $U + V$ as any other value in the interval $[0, 5]$. And also, $10%$ of probability of getting $U + V = 9$. So, the expected value is:
$$\begin{array}{rl} E(U + V) = & (10\% \times 0) + (10\% \times 1) + (10\% \times 2) + (20\% \times 3) + \\ & (10\% \times 4) + (10\% \times 5) + (20\% \times 6) + (10\% \times 9) \\ = & 10\% \times (0 + 1 + 2 + (2 \times 3) + 4 + 5 + (2 \times 6) + 9) \\ = & 10\% \times (0 + 1 + 2 + 6 + 4 + 5 + 12 + 9) \\ = & 10\% \times 39 \\ = & 3.9 \end{array}$$
The same reasoning could be applied for $X = 7$, but using $Y = X - U$ instead of $Y = X + U$.
Finally:
If $X = 5$, then each value in $[1, 4]$ has $20\%$ of probability of being $U$. $0$ and $5$ also have $10\%$ each.
If $U = 0$, that is great, Make $Y = X$ and then $V = 0$. This has $10\%$ of probability of happening. So $U + V = 0$ in $10\%$ of the cases.
If $U = 5$, fine. Make $Y = X + U$ and then $V = 0$. This has $10\%$ of probability of happening.
If $U = 1$, then we'll need to guess. $Y$ could either be $4$ or $6$. One will give us $U + V = 1$ and the other $U + V = 3$ with $10\%$ of probability for each one.
If $U = 2$, then we'll also need to guess. $Y$ could either be $3$ or $7$. One will give us $U + V = 2$ and the other $U + V = 6$ with $10\%$ of probability for each one.
If $U = 3$, then we'll once again will need to guess. $Y$ could either be $2$ or $8$. One will give us $U + V = 3$ and the other $U + V = 9$ with $10\%$ of probability for each one.
If $U = 4$, guess once more. $Y$ could either be $1$ or $9$. One will give us $U + V = 4$ and the other $U + V = 12$ with $10\%$ of probability for each one.
In the end, we have $20\%$ of probability of getting $U + V = 3$, $10\%$ of probability of getting $U + V$ as any other value in the interval $[0, 6]$. And also, $10\%$ of probability of getting $U + V = 9$ and $10\%$ for $U + V = 12$. So, the expected value is:
$$\begin{array}{rl} E(U + V) = & (10\% \times 0) + (10\% \times 1) + (10\% \times 2) + (20\% \times 3) + (10\% \times 4) + \\ & (10\% \times 5) + (10\% \times 6) + (10\% \times 9) + (10\% \times 12) \\ = & 10\% \times (0 + 1 + 2 + (2 \times 3) + 4 + 5 + 6 + 9 + 12) \\ = & 10\% \times (0 + 1 + 2 + 6 + 4 + 5 + 6 + 9 + 12) \\ = & 10\% \times 45 \\ = & 4.5 \end{array}$$
The same reasoning could be applied for $X = 6$, but using $Y = X - U$ instead of $Y = X + U$.
General rule:
After B chooses some $X$ and was given some $U$, this is what B should do:
1. Compute $P = X + U$ and $Q = X - U$.
2. If $P = Q$, then $Y = P$.
3. If only one of $P \in [0, 9]$ and $Q \in [0, 9]$ is true, choose that one as $Y$.
4. Otherwise, guess either $P$ or $Q$ as the answer. One is a good guess and the other is a terrible one. If you prefer to not be cold nor hot and stay warm, you might just choose a middle ground and make $Y = X$.
The best numbers to choose as $X$ are:
$3$ and $8$. Their expected value is lower than the other choices.