Step 1: Set up the partial fractions.
We are given the equation:
\[
\frac{e^x + 2}{(e^x - 1)(2e^x - 3)} = -\frac{3}{e^x - 1} + \frac{B}{2e^x - 3}
\]
To combine the fractions on the right-hand side, get a common denominator:
\[
-\frac{3}{e^x - 1} + \frac{B}{2e^x - 3} = \frac{-3(2e^x - 3) + B(e^x - 1)}{(e^x - 1)(2e^x - 3)}
\]
Step 2: Set the numerators equal.
Since the denominators are the same on both sides, we can set the numerators equal to each other:
\[
e^x + 2 = -3(2e^x - 3) + B(e^x - 1)
\]
Step 3: Expand both sides.
Expand the right-hand side:
\[
e^x + 2 = -6e^x + 9 + B(e^x - 1)
\]
Now distribute \( B \):
\[
e^x + 2 = -6e^x + 9 + Be^x - B
\]
Step 4: Combine like terms.
Combine the \( e^x \) terms and constant terms:
\[
e^x + 2 = (-6 + B)e^x + (9 - B)
\]
Step 5: Compare coefficients.
Equate the coefficients of \( e^x \) and the constant terms on both sides:
- From the \( e^x \)-terms: \( 1 = -6 + B \quad \implies \quad B = 7 \)
- From the constant terms: \( 2 = 9 - B \quad \implies \quad B = 7 \)
Step 6: Conclusion.
Thus, \( B = 7 \), corresponding to option (D).