\[2 + 5 + 8 + .. + x = 126\]
\[d = 5 - 2 = 3;\ \ \]
\[a_{n} = 2 + 3 \cdot (n - 1) = x\]
\[x = 3n - 1\]
\[S = \frac{2 + 3n - 1}{2} \cdot n = 126\]
\[(3n + 1) \cdot n = 252\]
\[3n^{2} + n - 252 = 0\]
\[D = 1 + 3024 = 3025\]
\[n_{1} = \frac{- 1 - 55}{6} < 0\]
\[n_{2} = \frac{- 1 + 55}{6} = 9\]
\[x = 27 - 1 = 26.\]
\[Ответ:x = 26.\]