Suppose $(x_i,y_i)$ are random draws from the population and $\alpha, \beta$ are scalars. Let $u_i$ be unobserved effects(residuals). Consider the model $y_i=\alpha+\beta x_i +u_i$. By Law of Iterated Expectation, we know $E(E(\alpha+\beta x_i|x_i))=E(\alpha+\beta x_i)$. In fact, when $x_i$ is known, can we write $E(\alpha+\beta x_i|x_i)=E(\alpha+\beta x_i)=\alpha+\beta x_i?$
Also, since median is not linear, why do we have $Med(\alpha+\beta x_i+u_i|x_i)=\alpha+\beta x_i +Med(u_i|x_i)$?
Thanks in advance!
What you wrote ends up being correct but is not the correct step. $$E(\alpha + \beta x_i | x_i) = \alpha + \beta E(x_i | x_i) = \alpha + \beta x_i$$ where first equality is by linearity, and second is by measurability. Your equalities are certainly not true unless x_i is somehow constant. For your second question, I think it is at least additive so you can take out $\alpha$, since finding the median of the entire expression is the same as shifting by $\alpha$ to the left, find new median, and add $\alpha$ to it. Then you can take out $x_i$ for the same reason by measurability.