How to solve $$t_n=(1+c q^{n-1})p~t_{n-1}+a +nbq,\quad n\ge 2.$$ given that $$t_1=b+(1+c~p)(a~q^{-1}+b),\qquad p+q=1.$$
N.B- Some misprints in the question I corrected. Sorry for the misprint $an+b$ is actually $a+nbq$.
How to solve $$t_n=(1+c q^{n-1})p~t_{n-1}+a +nbq,\quad n\ge 2.$$ given that $$t_1=b+(1+c~p)(a~q^{-1}+b),\qquad p+q=1.$$
N.B- Some misprints in the question I corrected. Sorry for the misprint $an+b$ is actually $a+nbq$.
let $$\dfrac{h_{n-1}}{h_{n}}=(1+cq^{n-1})p$$ so we have $$\dfrac{h_{n-2}}{h_{n-1}}=(1+cq^{n-2})p$$ $$\cdots\cdots$$ $$\dfrac{h_{1}}{h_{2}}=(1+cq)p$$ $$\dfrac{h_{1}}{h_{n}}=\prod_{k=1}^{n-1}(1+cq^k)p\Longrightarrow h_{n}=\dfrac{h_{1}}{\prod_{k=1}^{n-1}(1+cq^k)p}$$ then we have $$t_{n}=\dfrac{h_{n-1}}{h_{n}}t_{n-1}+an+b$$ $$\Longrightarrow h_{n}t_{n}=h_{n-1}t_{n-1}+(an+b)h_{n}$$ so we have $$h_{n}t_{n}=\sum_{i=2}^{n}\left(h_{i}t_{i}-h_{i-1}t_{i-1}\right)+h_{1}t_{1}=\sum_{i=2}^{n}(ai+b)h_{i}+h_{1}t_{1}$$ so $$t_{n}=\dfrac{\sum_{i=2}^{n}(ai+b)h_{i}+h_{1}t_{1}}{h_{n}}=\prod_{k=1}^{n-1}(1+cq^k)p\cdot\left(\dfrac{(\sum_{i=2}^{n}(ai+b)h_{i}}{h_{1}}+t_{1}\right)$$