Solve 3^2x+1 = 5(3^x) + 2

I would know how to solve it if it was only 3^2x+1, but now it seems more complicated.

let u = 3^x

Then your equation becomes

3^(2x+1) = 5*3^x + 2
3*3^(2x) = 5*3^x + 2
3u^2-5u-2 = 0
...