Answer
$\psi=Ae^{ikx}+Be^{-ikx}$ is a solution of $\frac{d^2\psi}{dx^2}+k^2\psi=0$ (proved). See step by step work.
Work Step by Step
We have to show that $\psi=Ae^{ikx}+Be^{-ikx}$ is a solution of
$\frac{d^2\psi}{dx^2}+k^2\psi=0$ .................$(1)$
$\psi=Ae^{ikx}+Be^{-ikx}$
$\therefore\;\;\frac{d\psi}{dx}=ikAe^{ikx}-ikBe^{-ikx}$
or, $\frac{d^2\psi}{dx^2}=-k^2Ae^{ikx}-k^2Be^{-ikx}$
or, $\frac{d^2\psi}{dx^2}=-k^2[Ae^{ikx}+Be^{-ikx}]$
or, $\frac{d^2\psi}{dx^2}=-k^2\psi$ .................$(2)$
Substituting eq. $(2)$ in the left hand side of eq. $(1)$, we get
$-k^2\psi+k^2\psi=0$
Therefore, $\psi=Ae^{ikx}+Be^{-ikx}$ is a solution of $\frac{d^2\psi}{dx^2}+k^2\psi=0$