For any $i=1,\ldots,n$, we have, using the Total Law of Expectation, conditioning on the value of $U_i$,
\begin{eqnarray*}
&& \\
E(U_i\vert \max\{U_1,..,U_n\}=t) &=& E(U_i\vert U_i=t\cap \max\{U_1,..,U_n\}=t)P(U_i=t\vert \max\{U_1,..,U_n\}=t) \\
&& + E(U_i\vert U_i\neq t\cap \max\{U_1,..,U_n\}=t)P(U_i\neq t\vert \max\{U_1,..,U_n\}=t) \\
&& \\
&=& t\cdot \dfrac{1}{n}\; + \;\dfrac{t+1}{2}\cdot \dfrac{n-1}{n}.
\end{eqnarray*}
By the linearity of expectation,
\begin{eqnarray*}
E(U_1+\cdots+U_n\mid \max\{U_1,..,U_n\}=t) &=& \sum_{i=1}^n{E(U_i\mid \max\{U_1,..,U_n\}=t)} \\
&& \\
&=& \sum_{i=1}^n{\left(t\cdot \dfrac{1}{n}\; + \;\dfrac{t+1}{2}\cdot \dfrac{n-1}{n}\right)} \\
&& \\
&=& t + (n-1)\dfrac{t+1}{2}.
\end{eqnarray*}
Note:
This result is intuitive: one value of $t$ and the remaining $n-1$ values taking the average value in interval $(-1,t)$.
If you expand the definition of expectation, you get
\begin{align*}
\mathbb{E} f(X,Y)
&= \int_{[0,1]} \sum_{y\in\{y_1,y_2\}} f(x,y)\mathbb{P}\{x\in dx\}\mathbb{P}\{Y=y\} \\
&= \int_{[0,1]} dx \left( f(x,y_1)\lambda + f(x,y_2)(1-\lambda) \right)
\end{align*}
You can use a similar "return to the definition" to write the conditional expectations as well.
Best Answer
I believe the approach you are trying to use is the Law of Total Expectation:
$$\mathbb{E}[g(X)] = \mathbb{E}[g(X) \ | \ A] \ \mathbb{P}(A) + \mathbb{E}[g(x) \ | \ A^c] \ \mathbb{P}(A^c).$$ In your case, taking $g(X) = \max(K-X,0)$ and $A$ being the event that $X \leq K,$ we get
$$\mathbb{E}[\max(K-X)] = \mathbb{E}[\max(K-X) \ | \ X\leq K] \ \mathbb{P}(X\leq K) + \mathbb{E}[\max(K-X) \ | \ X>K] \ \mathbb{P}(X>K)$$
$$ = \mathbb{E}[K-X \ | \ X\leq K] \ \mathbb{P}(X\leq K) + \mathbb{E}[0 \ | \ X>K] \ \mathbb{P}(X>K) $$ $$= \mathbb{E}[K-X \ | \ X\leq K] \ \mathbb{P}(X\leq K)$$
If $X$ is uniform over $[-K, K]$ then by linearity of expectation this evaluates to $K.$
Another approach is to use
$$ \mathbb{E}[g(X)] = \int_{-\infty}^{\infty} g(x) p(x) dx$$
where $p(x)$ is the density of the random variable $X.$ So in your example with $X$ uniform over $[-K, K]$ we have $$ \mathbb{E}[\max(K-x,0)] = \int^K_{-K} max(K-x, 0) \cdot \frac{1}{2K} dx = K$$