is it correct way to solve this?
if not then please provide me the solution
No, it is wrong. It is non homogeneous recurrence relation.
I have done the simplification,now you just need to put the value of a0 a1 and get the answer
as the rhs of equation 2.1n so we tool a trial of 2A1n
and put this value to original equation
X->YZ , Y->XZ , ...