Step 1: Look at what is under the square root.
We must integrate $\sqrt{1+2\tan x(\tan x+\sec x)}$. The plan is to turn the messy inside into a perfect square so the root disappears.
Step 2: Open the bracket.
Inside we have $1+2\tan^2 x+2\tan x\sec x$.
Step 3: Split the $1$ smartly using an identity.
Write $2\tan^2 x$ as $\tan^2 x+\tan^2 x$. Then group $1+\tan^2 x=\sec^2 x$. So the inside is $\sec^2 x+\tan^2 x+2\sec x\tan x$.
Step 4: Recognise the perfect square.
That is exactly $(\sec x+\tan x)^2$. Taking the square root gives $\sec x+\tan x$.
Step 5: Integrate the simple pieces.
Now $\int(\sec x+\tan x)\,dx=\int\sec x\,dx+\int\tan x\,dx=\log|\sec x+\tan x|+\log|\sec x|+c$.
Step 6: Combine the two logs into one.
Using $\log m+\log n=\log(mn)$, the answer is $\log[\sec x(\sec x+\tan x)]+c$, which is option (3). \[ \boxed{\log[\sec x(\sec x+\tan x)]+c} \]