Logarithm

3^3x+1=3^5x-2

3^3x+1-3^5x-2=0

Log(3^3x+1-3^5x-2)=log0

Please explain to me why is the last step is wrong

log 0 is not defined

If 3^a = 3^b, then a=b. So,

3^3x+1=3^5x-2
3x+1 = 5x-2
2x = 3
x = 3/2