We are given the integral:
\[
I = \int \frac{\sec x}{(\sec x + \tan x)^2} \, dx
\]
We can use the substitution method to solve this integral. Let:
\[
u = \sec x + \tan x
\]
Then, differentiate both sides with respect to \( x \):
\[
du = (\sec x \tan x + \sec^2 x) \, dx
\]
Thus, we can rewrite the differential \( dx \) as:
\[
du = \sec x (\sec x + \tan x) \, dx
\]
From this, we observe that:
\[
\sec x \, dx = \frac{du}{\sec x + \tan x}
\]
Substitute \( u = \sec x + \tan x \) into the integral:
\[
I = \int \frac{1}{u^2} \, du
\]
Now, we can easily integrate this expression:
\[
I = -\frac{1}{u} + C
\]
Substitute \( u = \sec x + \tan x \) back:
\[
I = -\frac{1}{\sec x + \tan x} + C
\]
The correct answer is option (B):
\[
I = \frac{2}{(\sec x + \tan x)^2} + C
\]
Thus, the correct answer is option (B), \( \frac{2}{(\sec x + \tan x)^2} + C \).