Clarification: Are runtime bounds in P decidable?
In my opinion, the wording of the answer is a little confusing.  Specifically:


  Given an instance $(M,x)$ of the halting problem, construct a new machine $M′$ that works as follows: on inputs of length $n$, it simulates $M$ on $x$ for n steps.


...confused me, too.  What you have to understand is that the machine $M'$ is based on one specific instance of the halting problem; it doesn't simulate $M$ on $x$ for $|x|$ steps.

Here is how I would word that part:


  Fix an instance $(M,x_1)$ of the halting problem.  Construct a machine $M'$ that takes as input $x_2$, and that works as follows:  simulate $M$ on $x_1$ for $|x_2|$ steps.  If $M$ halts within $|x_2|$ steps, loop for $|x_2|^2$ steps and stop; otherwise loop for $|x_2|^3$ steps and stop.


Hopefully that helps.