You know that ABC=40, so 3x-1-2x+34=40. You add like terms to get x+33=40. Then you use the subtraction property of equality to get x=7.