Step 1: Use the king's rule.
The property $\int_a^b f(x)\,dx=\int_a^b f(a+b-x)\,dx$ helps here. The limits add to $\frac{\pi}{4}+\frac{3\pi}{4}=\pi$, so replace $x$ by $\pi-x$.
Step 2: Apply it to the first integral.
Since $\sin(\pi-x)=\sin x$ and $\cos2(\pi-x)=\cos2x$, \[ I=\int_{\pi/4}^{3\pi/4}\frac{(\pi-x)\sin x}{1+3\cos2x}\,dx \]
Step 3: Add the two forms of $I$.
\[ 2I=\int_{\pi/4}^{3\pi/4}\frac{[x+(\pi-x)]\sin x}{1+3\cos2x}\,dx=\pi\int_{\pi/4}^{3\pi/4}\frac{\sin x}{1+3\cos2x}\,dx \]
Step 4: Read off $k$.
So $I=\frac{\pi}{2}\int(\dots)$, which means $k=\frac{\pi}{2}$.
Step 5: Form the target integral.
The exponent is $\frac{\pi}{k}=\frac{\pi}{\pi/2}=2$, so we need \[ \int_0^{\pi/2}\sin^2x\,dx \]
Step 6: Evaluate using the half-angle identity.
\[ \int_0^{\pi/2}\frac{1-\cos2x}{2}\,dx=\left[\frac{x}{2}-\frac{\sin2x}{4}\right]_0^{\pi/2}=\frac{\pi}{4} \] \[ \boxed{\tfrac{\pi}{4}} \]