Answer
We find that $a=\sqrt2$ and $b=\frac{\pi}{4}.$ The integral is
$$\int\frac{dx}{\sin x+\cos x}=-\frac{\sqrt2}{2}\ln|\csc (x+\pi/4)+\cot (x+\pi/4)|+c.$$
Work Step by Step
We will use the trigonometric identity $\sin x+\cos x=a \sin x\cos b+a\cos x\sin b.$ Coefficients multiplying $\sin x$ and $\cos x$ have to be equal on both sides of the equality: $a\cos b=1$ and $a\sin b=1.$ We will firstly square both of them and add them together:
$a^2\cos^2b+a^2\sin^2b=2\Rightarrow a^2(\cos^2b+\sin^2b)=2\Rightarrow a^2=2\Rightarrow a=\sqrt2,$ where we used that $\cos^2b+\sin^2b=1.$
Now dividing both of them we get:
$$\frac{a\sin b}{a\cos b}=1\Rightarrow\tan b=1\Rightarrow b=\arctan1=\frac{\pi}{4}.$$
Using the calculated results we get $\sin x+\cos x=\sqrt2\sin(x+\frac{\pi}{4}).$
Putting this into the integral we get:
$$\int\frac{dx}{\sin x+\cos x}=\int\frac{dx}{\sqrt2\sin(x+\frac{\pi}{4})}=\frac{1}{\sqrt2}\int\frac{1}{\sin(x+\frac{\pi}{4})}dx=\frac{1}{\sqrt2}\int\csc\left(x+\frac{\pi}{4}\right)dx=-\frac{\sqrt2}{2}\ln|\csc( x+\frac{\pi}{4})+\cot (x+\frac{\pi}{4})|+c.$$