Applying the SOV method
\begin{align*}
\frac{dy}{dx} \amp = (\cos x)\cdot\frac{1}{y} \\
y\ dy \amp = \cos(x)\ dx \\
\int y\ dy \amp = \int \cos(x)\ dx \\
\frac{y^2}{2} \amp = \sin(x) + c_1
\end{align*}
we arrive at the implicit general solution:
\begin{equation*}
y^2 = 2\sin(x) + c
\end{equation*}
where \(c=2c_1\text{.}\)
Explicitly solving for \(y\text{,}\) shows our general solution has two branches:
\begin{equation*}
y(x)
= \pm\sqrt{2\sin(x) + c}
= \left\{
\begin{array}{c}
-\sqrt{2\sin(x) + c} \\
\sqrt{2\sin(x) + c}
\end{array}
\right.
\end{equation*}
Since our solution must satisfy \(y(0)=-5\text{,}\) which has a negative \(y\)-value, our particular solution must come from the negative branch:
\begin{equation*}
y(x) = -\sqrt{2\sin x + c}.
\end{equation*}
Finally, we find \(c\) with the initial condition \(y(0) = -5\text{:}\)
\begin{equation*}
-5 = -\sqrt{2\sin(0) + c} \ \Rightarrow\ c = 25.
\end{equation*}
Thus, the explicit particular solution is:
\begin{equation*}
y = -\sqrt{2\sin x + 25}.
\end{equation*}