This is the expression of the posterior risk but I don't understand the step of the line 2. How can we developped the first line in this way ?
$T^*$ is defined as $E[\theta | X]$
Add and subtract $T^*$ inside the square: $$\mathbf E[(T -T^* +T^* - \theta)^2|X)] = \mathbf E[(T - T^*)^2 + (T^* - \theta)^2 + 2(T - T^*)(T^* - \theta)].$$
Now, we use the linearity of expectations and the fact that $T$ and $T^*$ are $X$-measurable (they act as constants in expectations conditional on $X$). Hence, $$\ldots = (T - T^*)^2 +\mathbf E[ (T^* - \theta)^2 + 2(T - T^*)\mathbf E[T^* - \theta].$$