Giving $X$ the largest possible values and probabilities subject to the constraints will maximize its expectation.
Thus, the variable $X$ equal to $10$ with a probability of $2/5$ and equal to $5$ with a probability of $3/5$ will maximize the expectation.
Formally, let $F$ be the distribution for $X,$ given by $F(x)=\Pr(X\le x)$ for $0\le x \le 10.$ The information given you is
For all $\epsilon \gt 0,$ $F(-\epsilon)=0.$ (The probability of the empty set is zero.)
$F(10)=1.$ (The probability of the sample space is $1.$)
For all $\epsilon\gt 0,$ $F(1-\epsilon)\le 1/2 = 0.5.$
$1-F(5) \le 2/5.$ Equivalently, $F(5) \ge 3/5 = 0.6.$
Subject to these constraints, you wish to maximize the expectation, which can be expressed in terms of $F$ as
$$E[X] = \int_0^{10}\left(1 - F(x)\right)\,\mathrm{d}x.$$
The values of $x$ explicitly referenced in the constraints are $0, 1, 5,$ and $10.$ So, let's partition this integral at those points. Here's a picture where the permissible regions for the graph of $F$ are unshaded: that is, the graph must stay within the white area.

Although it is difficult to draw, bear in mind that constraint $(1)$ forces $F=0$ to the left of $x=0$ and constraint $(2)$ forces $F=1$ to the right of $x=10.$
Here is an example of such a distribution function. Bear in mind that it cannot decrease at any point from left to right.

The expectation is the area above the graph of $F$ and to the right of $0.$ To maximize that area, then, we must make $F$ as low as possible subject to the constraints. Here, in red, is the graph of an $F$ that comes close to that optimum. The area represented by the integral for $E[X]$ is shaded in red.

At this point I hope it is obvious that the best possible upper bound for the expectation is the sum of three rectangular areas: from $0$ to $1$ (with height $1$), from $1$ to $5$ (with height $1$), and from $5$ to $10$ (with height $2/5$). Multiplying the widths times the heights, we find
$$E[X] \le (1-0)\times(1) + (5-1)\times(1) + (10-5)\times(2/5) = 7.$$
Incidentally, because $7\le 8.5,$ the statement in the question is correct--but $8.5$ is not the best possible upper bound.