I'm not sure it's as hard as you're making it out to be. First, let's find an integrating factor. We want
$$py''-2py'\tan x=(py')'$$
$$-2p\tan x=p'$$
$$\frac p{p'}=-2\frac{\sin x}{\cos x}$$
$$\ln p=2\ln(\cos x)=\ln(\cos^2x)$$
$$p=\cos^2x$$
Multiplying through by our integrating factor, we get
$$y''\cos^2x-2y'\sin x\cos x=(y'\cos^2x)'=\sec x$$
$$y'\cos^2x=\ln(\sec x+\tan x)+C$$
$$y'=\sec^2x\ln(\sec x+\tan x)+C\sec^2x$$
$$y=\int\sec^2x\ln(\sec x+\tan x)dx+C\int\sec^2xdx$$
The second part is simply $C\tan x$. For the first integral, we'll use integration by parts. Obviously, we want that logarithm to go away, so that's the part we'll take the derivative of.
$$u=\ln(\sec x+\tan x),du=\sec x$$
$$dv=\sec^2xdx,v=\tan x$$
$$\int\sec^2x\ln(\sec x+\tan x)dx=\tan x\ln(\sec x +\tan x)-\int\sec x\tan xdx=$$
$$\tan x\ln(\sec x+\tan x)-\sec x$$
Putting everything together, we have
$$y=\tan x\ln(\sec x+\tan x)-\sec x+k_1\tan x+k_2$$