How do you solve 3^4=3^(3x+1)?

$x = 1$
Bases being same for the exponents on both sides, we can equate $4 = 3 x + 1$
On solving this we would have $x = 1$