[guided]The obstruction to solving the second Cousin problem lives in $H^1(X,\mathcal{O}^*)$, so we prove that this group vanishes. Let $\underline{\mathbb{Z}}$ be the constant sheaf on $X$. The Exponential Sheaf Sequence is
\begin{align*}
0\longrightarrow \underline{\mathbb{Z}}\xrightarrow{\iota}\mathcal{O}\xrightarrow{\operatorname{Exp}}\mathcal{O}^*\longrightarrow 1.
\end{align*}
Here $\iota$ sends a locally constant integer-valued function $n$ to the holomorphic function $2\pi i n$, and $\operatorname{Exp}$ sends each $g\in\mathcal{O}(U)$ to the nowhere-vanishing holomorphic map
\begin{align*}
\operatorname{Exp}(g):U&\to \mathbb{C}^*\\
x&\mapsto e^{g(x)}.
\end{align*}
Exactness means two things: the kernel of $\operatorname{Exp}$ is exactly $2\pi i\,\underline{\mathbb{Z}}$, and every nowhere-vanishing holomorphic function has a local holomorphic logarithm.
Applying the Long Exact Sequence in Sheaf Cohomology to this short exact sequence gives
\begin{align*}
H^1(X,\mathcal{O})\xrightarrow{\operatorname{Exp}_*}H^1(X,\mathcal{O}^*)\xrightarrow{c_1}H^2(X,\underline{\mathbb{Z}}),
\end{align*}
where $c_1$ is the connecting homomorphism, equivalently the first Chern class map for holomorphic line bundles.
We now verify the two endpoint vanishings. First, $\mathcal{O}$ is coherent by the Oka Coherence Theorem. Since $X$ is Stein, Cartan's Theorem B applies to the coherent sheaf $\mathcal{O}$ and gives
\begin{align*}
H^1(X,\mathcal{O})=0.
\end{align*}
Second, a complex manifold is paracompact and locally contractible, so the Comparison Theorem for Constant Sheaf Cohomology identifies $H^2(X,\underline{\mathbb{Z}})$ with the integral cohomology group $H^2(X,\mathbb{Z})$ appearing in the theorem statement. The hypothesis gives
\begin{align*}
H^2(X,\underline{\mathbb{Z}})=0.
\end{align*}
Let $\alpha\in H^1(X,\mathcal{O}^*)$. Since the target $H^2(X,\underline{\mathbb{Z}})$ is zero, $c_1(\alpha)$ is the straightforward class. Exactness then places $\alpha$ in the image of $\operatorname{Exp}_*$. But the source $H^1(X,\mathcal{O})$ is zero, so that image is straightforward. Hence every $\alpha$ is straightforward, and therefore
\begin{align*}
H^1(X,\mathcal{O}^*)=0.
\end{align*}[/guided]