There appears to be a contradiction while solving recurrence relation Consider the equation :
$$
y[n]-\frac{1}{2}y[n-1]=x[n]
$$
where $x[n]:=\left(\frac{1}{3}\right)^{n}u[n]$. First, I was asked to find the homogenous part of the solution having a form $y_{h}:=A\frac{1}{2^{n}}$. Indeed the homogenous solution
$$
y_{h}[n]=\frac{1}{2^{n}}y[0]
$$
where I insist $A=y[0]$. Furthermore, The particular solution is given of the form $y_{p}[n]:=B\left(\frac{1}{3}\right)^{n}u[n]$ I shall determine $B$ as follow :
$$
B\left(\frac{1}{3}\right)^{n}u[n]-\frac{1}{2}B\left(\frac{1}{3}\right)^{n-1}u[n-1]=\left(\frac{1}{3}\right)^{n}u[n]
$$
\begin{align*}
\implies B&=\frac{\displaystyle\left(\frac{1}{3}\right)^{n}u[n]}{\displaystyle\left(\frac{1}{3}\right)^{n}u[n]-\frac{1}{2}\displaystyle\left(\frac{1}{3}\right)^{n-1}u[n-1]}\\ \\
&=\frac{\displaystyle\left(\frac{1}{3}\right)^{n}}{\displaystyle\left(\frac{1}{3}\right)^{n}-\displaystyle\frac{1}{2}\left(\frac{1}{3}\right)^{n-1}}\\ \\
&=-2
\end{align*}
So now that we have $B=-2$, We are given the initial rest condition (a condition that states if $x[n]=0$, $\forall n<0$ then $y[n]=0$ $\forall n<0$). so what I did was sub $n=0$ in difference equation
$$
y[0]-\frac{1}{2}y[-1]=x[0]
$$
$$
\implies y[0]=1
$$
$$
**\text{So this means $A=y[0]=1$}**
$$
However, the major issue is that :
$$
y[0]-\frac{1}{2}y[-1]=x[0]
$$
$$
\implies y[0]=1
$$
$$
\implies y[n]:= y_{h}[n]+y_{p}[n] \implies y[0]=y_{h}[0]+y_{p}[0]=1
$$
$$
\implies A\left(\frac{1}{2}\right)^{0} -2\left(\frac{1}{3}\right)^{0}=1
$$
$$
\implies A=3
$$
So I have $A=1$ and $A=3$, an obvious contradiction and I hope someone can help me.
Remark : $u[n]$ is the unit-step function where :
$$
u[n]:=
\begin{cases}
1&\text{if $n\geq0$}\\
0&\text{if $n<0$}
\end{cases}
$$

The homogeneous solution gives
$$
y_h(n) = 2^{1-n}c_0
$$
now making for the particular $y_p(n) = 2^{1-n}c_0(n)$ after substituting into the complete recurrence we have
$$
c_0(n)-c_0(n-1) = \frac{2^{n-1}}{3^n}
$$
and solving this recurrence we have
$$
c_0(n) = 1-\left(\frac23\right)^n
$$
hence
$$
y(n) = y_h(n)+y_p(n) = 2^{1-n}c_0 + 2^{1-n}\left(1-\left(\frac23\right)^n\right), \ \ \ n\ge 0
$$
