Solve the equation 3x+1=4x-8 for x.​