I have encountered an equation for logarithms and the guide in the book didn't make sense to me.

Here's the equation: 3^(x+2)=4^(x-1)

And here's how the book explained it:

1) Take log of each side: log3^(x+2)=log4^(x-1)

2)Take exponents to the front: x+2log3=x-1log4

and here's where it starts not making sense to me,

3)divide each side by 2log3: 2x=(-1log4)/(2log3)

How did the equation suddenly become 2x and why wouldn't it become (x+2)log3=(x-1)log4?