Well, we know that:
$$\frac{1-7\cos^2\left(x\right)}{\sin^7\left(x\right)\cos^2\left(x\right)}=\csc^7\left(x\right)\left(\sec^2\left(x\right)-7\right)\tag1$$
So, for the integral we get:
$$\int\frac{1-7\cos^2\left(x\right)}{\sin^7\left(x\right)\cos^2\left(x\right)}\space\text{d}x=\int\csc^7\left(x\right)\sec^2\left(x\right)\space\text{d}x-7\int\csc^7\left(x\right)\space\text{d}x\tag2$$
Now, for the right integral you can use the reduction formula.
$\color{red}{\text{But}}$ using integration by parts:
$$\int\csc^7\left(x\right)\sec^2\left(x\right)\space\text{d}x=\csc^6\left(x\right)\sec\left(x\right)+7\int\csc^7\left(x\right)\space\text{d}x\tag3$$
So, we get that:
$$\int\frac{1-7\cos^2\left(x\right)}{\sin^7\left(x\right)\cos^2\left(x\right)}\space\text{d}x=\csc^6\left(x\right)\sec\left(x\right)+\color{red}{7\int\csc^7\left(x\right)\space\text{d}x-7\int\csc^7\left(x\right)\space\text{d}x}\tag4$$
Which gives that:
$$\int\frac{1-7\cos^2\left(x\right)}{\sin^7\left(x\right)\cos^2\left(x\right)}\space\text{d}x=\csc^6\left(x\right)\sec\left(x\right)+\text{C}\tag{5}$$