Concept:
This problem involves a first-order differential equation that can be solved using the method of separation of variables. The key observation is that the expression \(3^{x+y}\) can be written as
\[
3^{x+y}=3^x\cdot3^y.
\]
After factorization, the variables \(x\) and \(y\) become completely separable. Once separated, both sides can be integrated directly. Finally, the given initial condition is used to determine the constant of integration.
Step 1: Simplify the given differential equation.
The given differential equation is
\[
\frac{dy}{dx}
=
\frac{3^{x+y}-2\cdot3^x}
{3^{x+y}-2\cdot3^y}.
\]
Using
\[
3^{x+y}=3^x3^y,
\]
we obtain
\[
\frac{dy}{dx}
=
\frac{3^x3^y-2\cdot3^x}
{3^x3^y-2\cdot3^y}.
\]
Factor \(3^x\) from the numerator and \(3^y\) from the denominator:
\[
\frac{dy}{dx}
=
\frac{3^x(3^y-2)}
{3^y(3^x-2)}.
\]
Step 2: Separate the variables.
Rearranging,
\[
\frac{3^y}{3^y-2}\,dy
=
\frac{3^x}{3^x-2}\,dx.
\]
Now all terms involving \(y\) are on the left side and all terms involving \(x\) are on the right side.
Step 3: Integrate the left-hand side.
Consider
\[
\int \frac{3^y}{3^y-2}\,dy.
\]
Let
\[
u=3^y-2.
\]
Then
\[
du=3^y\ln3\,dy.
\]
Hence
\[
3^y\,dy=\frac{du}{\ln3}.
\]
Substituting,
\[
\int \frac{3^y}{3^y-2}\,dy
=
\frac1{\ln3}
\int \frac{du}{u}.
\]
Therefore,
\[
=
\frac1{\ln3}\ln|u|.
\]
Substituting back,
\[
=
\frac1{\ln3}\ln|3^y-2|.
\]
Step 4: Integrate the right-hand side.
Similarly,
\[
\int \frac{3^x}{3^x-2}\,dx.
\]
Let
\[
v=3^x-2.
\]
Then
\[
dv=3^x\ln3\,dx.
\]
Thus,
\[
3^x\,dx=\frac{dv}{\ln3}.
\]
Hence
\[
\int \frac{3^x}{3^x-2}\,dx
=
\frac1{\ln3}
\int \frac{dv}{v}.
\]
Therefore,
\[
=
\frac1{\ln3}\ln|3^x-2|.
\]
Step 5: Equate the two results.
Thus,
\[
\frac1{\ln3}\ln|3^y-2|
=
\frac1{\ln3}\ln|3^x-2|
+C.
\]
Multiplying by \(\ln3\),
\[
\ln|3^y-2|
=
\ln|3^x-2|
+C_1.
\]
Using logarithmic properties,
\[
\ln|3^y-2|
=
\ln|C(3^x-2)|.
\]
Removing logarithms,
\[
3^y-2
=
C(3^x-2).
\]
Step 6: Use the initial condition.
Given
\[
y(1)=2.
\]
Substituting
\[
x=1,\qquad y=2,
\]
into
\[
3^y-2=C(3^x-2),
\]
gives
\[
3^2-2
=
C(3^1-2).
\]
\[
9-2=C(3-2).
\]
\[
7=C.
\]
Step 7: Substitute the value of \(C\).
Therefore,
\[
3^y-2
=
7(3^x-2).
\]
Expanding,
\[
3^y-2
=
7(3^x)-14.
\]
Adding \(2\) on both sides,
\[
3^y
=
7(3^x)-12.
\]
Taking logarithm base \(3\),
\[
y
=
\log_3\left(7(3^x)-12\right).
\]
Step 8: Final Answer.
\[
\boxed{
y=\log_3\left(7(3^x)-12\right)
}
\]
Hence the correct option is
\[
\boxed{\text{(C)}}.
\]