How to show that the method to create two correlated random numbers is correct? I would like to understand how I can show that the method to create two normally distributed random numbers given as an answer to this question is correct.
Given independent $X_1$ and $X_2$ normally distributed with mean zero and variance 1, one can get a randomvariable with correlation $\mathbb{E}[X_1 X_3] =\rho$ by setting 
$$
X_3=\rho X_1+\sqrt{1-\rho^2}X_2.
$$

It can be done like this:
$$\mathbb{E}[X_1 X_3] = \mathbb{E}[X_1 (\rho X_1+\sqrt{1-\rho^2}X_2]$$
$$ = \mathbb{E}[\rho X_1^2 +\sqrt{1-\rho^2}X_1X_2] $$
$$ = \rho\mathbb{E}[ X_1^2] +\sqrt{1-\rho^2}\mathbb{E}[X_1X_2] $$
Here I can use the relation $\mathbb{E}(X^2)=\text{Var}(X)+(\mathbb{E}[X])^2$ to get
$$=\rho + \sqrt{1-\rho^2}\mathbb{E}[X_1X_2].$$
Since $X_1$ and $X_2$ are independent we have $\mathbb{E}[X_1X_2]=0$, which leads to the desired result
$$\mathbb{E}[X_1 X_3]=\rho$$
