1. 2-Methylpropene ((CH$_3$)$_2$C=CH$_2$) reacts with HBr via electrophilic addition, not nucleophilic substitution, but the question likely refers to the mechanism of Br$^-$ addition. 
2. Without peroxide: HBr adds via Markovnikov rule, forming (CH$_3$)$_3$CBr (X) via carbocation (tertiary, stable), so $\text{S}_\text{N}1$-like addition. 
3. With peroxide ((CH$_3$COO)$_2$): Free radical mechanism gives anti-Markovnikov product (CH$_3$)$_2$CHCH$_2$Br (Y) via primary radical, $\text{S}_\text{N}2$-like addition. 
4. Thus, X (Markovnikov) is $\text{S}_\text{N}1$, Y (anti-Markovnikov) is $\text{S}_\text{N}2$, so the answer is (4).