Assuming that x is the same value in each equation, 3x+5 will be 12 more than 3x-7.
In order to determine the difference between the two values, you ignore the 3x part, because it is the same on both of the equations, and then you count up from -7 to 0, which is 7, and then count from 0 to 5, which is 5; 7+5=12.