Let the number be represented by x.
Twice the sum of a number and 6. This is expressed as 2(x + 6)
three times the difference of the number and 2 is expressed as 3(x - 2).
Since both expressions are equal, it means that
2(x + 6) = 3(x - 2)
We would open the brackets by multiplying each term inside the bracket by the term outside. It becomes
2x + 12 = 3x - 6
3x - 2x = 12 + 6
x = 18
The number is 18