Solve the nonhomogeneous recurrence relation. $h_n=3h_{n-1} -2,\ (n\geq{1}); \ h_0=1$
so, $h_n-3h_{n-1}=-2$
I'm doing this by generating functions
$$g(x) = h_0+h_1x+h_2x^2+h_3x^3+...$$ $$-3x\ g(x)= -3h_0x-3h_1x^2-3h_2x^3-3h_3x^4-...$$
adding these two equations we get,
$$g(x)(1-3x) = 1+(h_1-3h_0)x+(h_2-3h_1)x^2+(9h_3-3h_2)x^3+... $$
so each of the $(h_n-h_{n-1})$ are equivalent to $-2$. Pluggin that in, we get
$$g(x)(1-3x) = 1-2x-2x^2-2x^3-2x^4... $$ add $-3$ to both sides,
$$g(x)(1-3x) -3=-2+2x+2x^2+2x^3+2x^4+... $$ $$= -2(1+x+x^2+x^3+x^4+...) $$ $$= -2\bigg(\frac{1}{1-x}\bigg) $$
isolating $g(x)$, we get $$g(x)= -2\bigg(\frac{1}{1-x}\bigg)\bigg(\frac{1}{1-3x}\bigg)+\bigg(\frac{3}{1-3x}\bigg) $$
$$g(x)= -2\bigg(\frac{1}{1-x}\bigg)\bigg(\frac{1}{1-3x}\bigg)+\bigg(\frac{3}{1-3x}\bigg)\bigg(\frac{1-x}{1-x}\bigg) $$ $$=\bigg(\frac{-2+3-3x}{(1-x)(1-3x)}\bigg) = \frac{1-3x}{(1-x)(1-3x)}$$
$$g(x)=\frac{1}{1-x} = \sum_{n=0}^{\infty} x^n$$
and $h_n = 1$
Besides your own method based upon generating functions, let me show you another one similar to the well-known method of "variation of constants" for 1st order ordinary differential equations.
First, drop the inhomogeneous part and study the homogeneous problem $g_n = 3 g_{n-1}$ with an unspecified initial condition $g_0 = c$. In this case, the solution is very quick to obtain: $g_n = 3^n c$.
Next, "vary the constant" $c$ by replacing it with $c_n$ and assume $h_n$ to be of the form $3^n c_n$ (i.e. the $g_n$ obtained above with $c$ replaced by $c_n$). From the defining formula of $h_n$ you will get $3^n c_n = 3^n c_{n-1} - 2$, which leads to
$$c_n = c_{n-1} - \frac 2 {3^n} = c_{n-2} - \frac 2 {3^{n-1}} - \frac 2 {3^n} = \dots = c_0 - \frac 2 {3^1} - \dots - \frac 2 {3^{n-1}} - \frac 2 {3^n} = \\ c_0 - \frac 2 3 \left(1 + \frac 1 3 + \dots + \frac 1 {3^{n-1}} \right) = c_0 - \frac 2 3 \frac {1 - \frac 1 {3^n}} {1 - \frac 1 3} = c_0 - 1 + \frac 1 {3^n} .$$
To find out $c_0$ use the initial condition: $1 = h_0 = 3^0 c_0$, so that $c_0 = 1$, whence you get $c_n = \frac 1 {3^n}$, which in turn implies $h_n = 3^n c_n = 3^n \frac 1 {3^n} = 1$.
With a result similar to the uniqueness property for inhomogeneous linear differential equations with constant coefficients, it can be shown that your problem has a unique solution (if any), therefore the solution $h_n = 1$ is the only one of your problem.