dy=(sinx/cosx)dx.
Let u=cosx, then du=-sinxdx so dy=-du/u, and integrating: y=-ln(au) where a is a constant.
Therefore y=ln|1/acosx|=ln|secx/a|.
When x=3, y=5, 5=ln|sec(3)|+c, where c=ln(1/a).
So c=5-ln|sec(3)|=5+ln|cos(3)| and y=ln|cos(3)/cosx|+5 QED.