It is 3(2x-2)=18.
Reason: Lets say x is pencils and y is pens. If the number of pens is 2 less than the number of pencils, the equation would be y = x - 2. Next, 18 equals 3 times the sum of x and y (pencils and pens), So the equation would be 3(x + y) = 18. Since you already know that y = x - 2, you can plug that into the equation. So, 3(x + x - 2) = 18. Then you add the two X's together to get, 3(2x-2) = 18.