Answer
$\psi(x)=a\cos kx-b\sin kx$
where we have assumed that $\psi_0=a$ and $i\psi_0=b$
Work Step by Step
According to the Eq. 38-24,
$\psi(x)=Ae^{ikx}+Be^{-ikx}$
where $A$ and $B$ are constants and $k$ is angular wave number.
Substituting $A=0$ and relabeling $B$ as $\psi_0$, we get
$\psi(x)=\psi_0e^{-ikx}$
Using Euler's formula, we get
$\psi(x)=\psi_0(\cos kx-i\sin kx)$
$\psi(x)=a\cos kx-b\sin kx$
where we have assumed that $\psi_0=a$ and $i\psi_0=b$