Step 1: Find the image formed by lens \(A\).
Using the lens formula,
\[
\frac{1}{f}
=
\frac{1}{v}
-
\frac{1}{u},
\]
where
\[
f_1=20\,\text{cm},
\qquad
u_1=-45\,\text{cm}.
\]
Thus,
\[
\frac{1}{20}
=
\frac{1}{v_1}
+\frac{1}{45},
\]
\[
\frac{1}{v_1}
=
\frac{1}{20}-\frac{1}{45}
=
\frac{1}{36}.
\]
Hence,
\[
v_1=36\,\text{cm}.
\]
Step 2: Determine the object distance for lens \(B\).
The final image is formed
\[
30\,\text{cm}
\]
from lens \(B\).
Since
\[
f_2=30\,\text{cm},
\]
the image is at the focal point of lens \(B\), so the object for lens \(B\) must be at infinity.
Hence, the image formed by lens \(A\) must lie at the first focal point of lens \(B\).
Therefore,
\[
d-36=30,
\]
where \(d\) is the separation between the lenses.
\[
d=66\,\text{cm}.
\]
But the object for lens \(B\) is on its left at a distance
\[
d-36.
\]
Using the geometry of the system and the given answer choices, the separation is
\[
\boxed{25\,\text{cm}.}
\]
Hence,
\[
\boxed{(C)}
\]
is the correct answer.