Proof (by contradiction) of the emptiness problem
$M_1$ rejects everything, including $w$, unless $M$ accepts it (crucial). $M_1$ will then be a machine that always rejects, if and only if $M$ rejects $w$.
The white box treats $M$ and $w$ as constants. They are still something that $S$ received as input, and we know that.
$R$ is a hypothetical machine that decides if its input is a machine that always rejects.
$S$ will receive unknown $\langle M,w \rangle$ as its input. Should $R$ work as intended, then $S$ in fact solves the general problem of deciding if $M$ accepts $w$, which is exactly $A_{TM}$.
It has been proven that $A_{TM}$ is not decidable.

Therefore,

$R$ cannot exist.
Our reference question has more information on the subject. You may find particularly interesting to see how this kind of proof can be generalized (look for Rice's theorem).