Step 1: Substitution:
Let \(x = a\tan^2\theta\), so \(\theta = \tan^{-1}\sqrt{\frac xa}\). Then \(\frac{a + x}{x} = \frac{\sec^2\theta}{\tan^2\theta} = \frac{1}{\sin^2\theta}\), so \(\sqrt{\frac{a+x}{x}} = \operatorname{cosec}\theta\). Hence \(\operatorname{cosec}^{-1}\sqrt{\frac{a+x}{x}} = \theta\).
Also \(dx = 2a\tan\theta\sec^2\theta\,d\theta\).
Step 2: Integrate by parts:
\[ I = \int\theta\cdot2a\tan\theta\sec^2\theta\,d\theta \]
Take \(u = \theta\) and \(dv = 2a\tan\theta\sec^2\theta\,d\theta\), so \(v = a\tan^2\theta\).
\[ I = a\theta\tan^2\theta - a\int\tan^2\theta\,d\theta = a\theta\tan^2\theta - a(\tan\theta - \theta) + c \]
Step 3: Simplify:
\[ I = a\theta\tan^2\theta - a\tan\theta + a\theta + c \]
This matches option (B), which has \(+a\theta\). Options with \(-a\theta\) come from a sign error in \(\int\tan^2\theta\,d\theta = \tan\theta - \theta\).
Final Answer:
The integral is \(a\theta\tan^2\theta - a\tan\theta + a\theta + c\), option (B).
\[ \boxed{a\theta\tan^2\theta - a\tan\theta + a\theta + c} \]