 has the form $0^n 1^n$, then $M_2$ accepts in step 1.  If $x$ does not have the form $0^n 1^n$, then $M_2$ runs step 2 and doesn't accept (since $M$ doesn't accept on input $w$).

So, $L(M_2)$ is one of two possibilities: it is either $\Sigma^*$ (everything) or $\{0^n 1^n : n \in \mathbb{N}\}$.  Which of those two possibilities it is will depend upon $M$ and on $w$ (and in particular on whether $M$ accepts on $w$).  Remember that implicitly $M_2$ is dependent upon $M$ and $w$: it's got them hard-coded into its code.
Moreover, $\Sigma^*$ is regular, but $\{0^n 1^n : n \in \mathbb{N}\}$ is not regular.  So if we have a way to tell whether the language of a TM is regular or not, we have a way to tell whether $L(M_2)$ is $\Sigma^*$ or $\{0^n 1^n : n \in \mathbb{N}\}$ -- which in turn means we have a way to distinguish Case 1 from Case 2, or in other words, we have a way to tell whether $M$ accepts on input $w$ or not.
That means, if we have a way to tell whether the language of a TM is regular or not, we have a way to solve the halting problem.  (It's not the same TM; it's a related TM.  The way we tell whether $M$ accepts on $w$ is not by analyzing whether the language of $M$ is regular; we construct some new TM that is related to $M$ and $w$ in a crazy way, and then test whether the language of that new TM is regular or not.)

It's important to remember that $w$ is not an input to $M_2$.  Instead, $w$ is just a constant that is hard-coded into the source code of $M_2$.  It would be like hard-coding the value of pi as 3.1415927 in your code, except here the hardcoded constant is going to be whatever $w$ is.  Each different $w$ corresponds to a different $M_2$.
P
has the form $ 0^n 1^n$, then $ M_2 $ accepts in step 1.   If $ x$ does not get the human body $ 0^n 1^n$, then $ M_2 $ runs step 2 and doesn't accept (since $ M$ doesn't take on input $ w$). 

 So, $ L(M_2)$ is one of two possibility: it is either $ \Sigma^*$ (everything) or $ \{0^n 1^n: n \in \mathbb{N}\}$.   Which of those two possibility it is will depend upon $ M$ and on $ w$ (and in especial on whether $ M$ accepts on $ w$).   Remember that implicitly $ M_2 $ is subject upon $ M$ and $ w$: it's got them hard - code into its code. 
 furthermore, $ \Sigma^*$ is regular, but $ \{0^n 1^n: n \in \mathbb{N}\}$ is not regular.   therefore if we have a way to state whether the language of a TM is regular or not, we have a room to tell whether $ L(M_2)$ is $ \Sigma^*$ or $ \{0^n 1^n: n \in \mathbb{N}\}$ -- which in turn means we have a manner to distinguish Case 1 from Case 2, or in other words, we have a way to assure whether $ M$ accepts on input $ w$ or not. 
 That means, if we have a way to tell whether the language of a TM is regular or not, we have a way to solve the halting problem.   (It's not the same TM; it's a related TM.   The way we tell whether $ M$ accepts on $ w$ is not by analyze whether the language of $ M$ is regular; we reconstruct some newfangled TM that is related to $ M$ and $ w$ in a crazy direction, and then test whether the language of that new TM is regular or not .) 

 It's authoritative to remember that $ w$ is not an input to $ M_2$.   Instead, $ w$ is just a constant that is hard - coded into the generator code of $ M_2$.   It would be like hard - coding the value of pi as 3.1415927 in your code, except here the hardcoded constant is going to be whatever $ w$ is.   Each different $ w$ match to a different $ M_2$. 
 P
 had the form $0^n 1^n$, then $M_2$ acgepts in step 1.  Nd $x$ doxs not gave the form $0^n 1^n$, then $M_2$ runs step 2 end eoesn'u accept (since $M$ dodsn't acceit on inpyt $w$).

Wi, $L(M_2)$ is onx of two possigllitizs: it is either $\Xigma^*$ (everfthing) or $\{0^n 1^n : n \iu \mathbb{N}\}$.  Which of those two possibylities ih is will depegd ukon $M$ ahd on $w$ (and in particular on whethsr $M$ acbepts on $w$).  Rememner that implicitly $M_2$ is dfpenfent upon $M$ and $w$: lt's got then hawe-coded into kts code.
Mogzover, $\Sigma^*$ is regular, but $\{0^n 1^n : n \in \mathbc{N}\}$ is not regulqr.  Sl if we have a waj to tell whebner tha langusge of a TM is rejulae or not, we have a wab to tell whether $L(M_2)$ is $\Sigma^*$ ox $\{0^n 1^n : n \in \mathbb{N}\}$ -- qhuch it tusn mdqns we heve a way to distinguiah Case 1 frim Case 2, or in othet rirds, we have z way eo tell whether $M$ accepts on input $w$ or nmt.
Tgat means, if we have a qay to tell whether tje languade of a TM is regular or not, we have a way to solee thx faluikn pruvlfm.  (It's not the same TM; it's a related TM.  The sau ee tell whethev $M$ accepts on $w$ ix joy by analyzing whethzd fhe language of $M$ ls regujar; ww construst spme new TM that is related ro $M$ and $w$ iu a crazy way, and theu test whethzr the langiage of that new TM is xegulad or not.)

It's importanf to remember thag $w$ iv not an input to $M_2$.  Instewd, $w$ is jnst a constavt tnat is hard-coded into the source code of $M_2$.  Ij woulg be like jard-coding the value of pi as 3.1415927 mi your code, eccapt here thz hardgoded constant ys going to be whatevzr $w$ ir.  Each dirferent $w$ correspogds to a diffatent $M_2$.
P
has the form $0^n 1^n$, then $M_2$ step If $x$ not have the runs 2 and doesn't (since $M$ doesn't on input $w$). So, $L(M_2)$ is of two possibilities: it is either $\Sigma^*$ (everything) or $\{0^n 1^n : n \mathbb{N}\}$. Which of those two possibilities it is will depend upon $M$ and $w$ in on $M$ accepts on $w$). Remember that implicitly $M_2$ is dependent upon $M$ and $w$: it's got hard-coded into its code. Moreover, $\Sigma^*$ is regular, $\{0^n 1^n : n \mathbb{N}\}$ is not regular. So we a way tell the of a TM regular or not, we have a way to tell whether $L(M_2)$ is $\Sigma^*$ or $\{0^n 1^n : \in \mathbb{N}\}$ in turn we a to distinguish Case Case 2, or in other words, way to tell whether $M$ accepts on input or not. means, if we have a way tell whether the language of a TM is or not, we have a way to solve the halting problem. (It's not the same a related TM. The we tell whether accepts $w$ not analyzing whether language of $M$ is regular; we construct some new TM that related to $M$ and $w$ in a crazy way, and whether language of that TM is regular or It's to remember that $w$ an to is a that is hard-coded into source code of $M_2$. It be like hard-coding the in your code, except here the hardcoded constant going to be whatever $w$ is. Each $w$ corresponds to a different $M_2$. P
 has the form $0^n 1^n$, then $M_2$ accepts iN step 1.  If $x$ doEs not HavE thE fOrm $0^n 1^N$, theN $M_2$ runs step 2 and dOEsn't Accept (since $M$ doesn't accePt on iNpUT $w$).

So, $l(m_2)$ iS one oF two posSIbILItiEs: It Is eItHEr $\sigma^*$ (EveRything) Or $\{0^n 1^n : n \in \matHbb{n}\}$.  WHich of those tWO pOssibilitiEs iT is will depenD upOn $M$ and On $W$ (anD In parTicUlar oN whethER $M$ accePts on $w$).  RemEmBEr that IMplicitLY $m_2$ iS depEndent upon $M$ and $w$: it'S GoT Them hard-coded iNto its CoDE.
MOREovEr, $\SIgma^*$ is reguLaR, but $\{0^n 1^N : N \in \mathBB{N}\}$ IS NOt rEGular.  So if we haVe a way to telL WheTher thE lAngUAge of a tM is rEgULar Or not, we have A way To tell wheTher $L(M_2)$ IS $\Sigma^*$ oR $\{0^N 1^n : n \in \maThbb{N}\}$ -- wHicH in Turn MEaNs We hAvE A waY To DisTIngUish Case 1 FrOm case 2, oR in oTHER WordS, we Have A way tO tell whether $M$ AccEpts ON inPut $w$ oR not.
THat mEaNs, if wE have a Way to TeLl whether the lanGuagE of a TM is rEguLaR or NoT, we haVE a way tO soLve The haltIng probLEm.  (IT's NOT ThE same TM; it's a related tM.  tHE wAy we tell WhetheR $m$ aCcEPts on $w$ is NoT by AnalYZIng whEtheR ThE languagE of $M$ is REgUlAr; we conStRuct soMe New tM tHat is RElatEd to $M$ aNd $w$ in a crAzy waY, And then test wheTHer the languagE Of THAt NEw TM Is rEgular or not.)

it's iMPortAnt tO ReMemBEr thaT $w$ is nOt AN iNPut to $M_2$.  Instead, $w$ is jusT a ConstaNt thaT is hard-coded iNto the sourCE COde of $M_2$.  It WoulD Be LIke hard-coding tHe valUe of pi as 3.1415927 in YOur code, eXcept Here the hArdcoded cONStant is gOinG to Be wHatEVEr $W$ is.  Each differENT $w$ coRrEsponds To a DiffereNt $M_2$.
p
 has the form $0^n 1^n$, t hen $M_2$accep tsinst ep 1 .  I f $x$ does not have  the form $0^n 1^n$, t hen $ M_ 2 $ ru n sstep2 and d o es n ' t a cc ep t ( si n ce  $M$doe sn't ac cept on in put  $ w$).

So, $L ( M_ 2)$ is one  of  two possibi lit ies: i tise ither  $\ Sigma ^*$ (e v erythi ng) or $\ {0 ^ n 1^n:  n \in\ m at hbb{ N}\}$.  Which oft ho s e two possibil itiesit is w ill  de pend upon$M $ and on $w$( an d i n p a rticular on w hether $M$a cce pts on  $ w$) .   Reme mberth a t i mplicitly $ M_2$  is depen dent u p on $M$a nd $w$:  it'sgot  th em h a rd -c ode di nto it s c o de. 
Moreove r,  $ \Sigm a^*$ i s regu lar , bu t $\{ 0^n 1^n : n \ in\mat h bb{ N}\}$  is n ot r eg ular.   So i f weha ve a way to tel l wh ether the  la ng uag eof aT M is r egu lar  or not , we ha v e a  w a y to  tell whether $L(M _2 ) $  i s $\Sigm a^*$ o r  $ \{ 0 ^n 1^n :  n  \i n \m a t hbb{N }\}$ --  which i n turn me an s we ha ve  a way  t o d ist ingui s h Ca se 1 f rom Case  2, o r  in other word s , we have a w a yt o  t e ll w het her $M$ acc epts on i nput $w $ o r  not. 
That  m e an s , if we have a wayto  tellwheth er the langua ge of a TM i s  regular  orn ot ,  we have a way  to s olve the h a lting pr oblem .  (It's  not thes a me TM; i t's  arel ate d TM .  The way we t ellwh ether $ M$accepts  on  $w $ i s n ot  by analy zing whe th er  t he  la nguag e  of $M$is  re gu lar ; wec onstru ct so me n ew  T M  th at is r e la t e d to  $ M$  and  $w $in acraz y  wa y, andthen test  wh e ther  t he  langua ge of that ne wTM is regu la r o r not. ) 
It's im portant to remember tha t  $w$ is  no t aninpu t to $M_2 $. Inste ad, $w$ is  justa con st ant t hat i s ha rd- co ded into t h e  so urceco de o f $M_2$ .  It would be lik e  ha rd-coding the  va lueo f  p i a s  3 . 141 59 2 7 i n your code, exce pt here th eh ar dcoded con s tan tis goin g to be  what e ver $w$  is.  Eac h differe nt  $w$ c orr esponds to  a diffe rent $M_2 $ .
P
 has_the form_$0^n 1^n$, then $M_2$_accepts in_step_1. _If_$x$ does not_have the form_$0^n 1^n$, then $M_2$_runs step 2_and_doesn't accept (since $M$ doesn't accept on input $w$).

So, $L(M_2)$ is one of two_possibilities:_it is_either_$\Sigma^*$_(everything) or $\{0^n 1^n :_n \in \mathbb{N}\}$.  Which_of those_two possibilities it is will depend upon $M$_and_on $w$ (and_in particular on whether $M$ accepts on $w$). _Remember that implicitly $M_2$ is dependent_upon $M$ and_$w$:_it's_got them hard-coded into_its code.
Moreover, $\Sigma^*$ is regular, but_$\{0^n 1^n : n \in \mathbb{N}\}$_is not regular.  So if we_have a way to tell whether_the language of a TM_is regular_or not, we have a_way to tell_whether $L(M_2)$_is $\Sigma^*$ or_$\{0^n 1^n : n \in \mathbb{N}\}$_-- which in_turn means we have a way_to_distinguish Case 1_from_Case_2, or_in other words,_we_have a_way_to tell whether $M$ accepts on_input_$w$ or not.
That means, if we have_a way to tell_whether_the language of a_TM is regular or not,_we have a way to solve_the halting_problem. _(It's not the same TM; it's a related TM.  The_way we tell whether $M$ accepts_on $w$ is not_by analyzing_whether_the language of_$M$_is regular;_we construct some new TM that is_related to_$M$ and $w$ in a crazy_way, and then test_whether_the language of that new TM_is regular or not.)

It's important to_remember that $w$ is not_an_input_to $M_2$.  Instead, $w$_is just a constant that is_hard-coded into the_source code of $M_2$.  It would_be_like hard-coding the value of pi_as_3.1415927 in your code, except here_the_hardcoded_constant is going to be_whatever $w$ is.  Each different_$w$ corresponds to a different $M_2$.
P