For the first problem, x - 7 = 20 you just need to understand that the letter x stands for some number you don't know. What the equation tells you is that if you subtract 7 from this unknown number you get an answer of 20. Hence you must have started with 27. That is x = 27.
The second problem requires a little more work. Sometimes it helps to think of an equation as a balance. The balance point is the equal sign and you have some things on each side. You want to manipulate the quantities on both sides, always maintaining a balance, and end with the single letter x on one side and a number on the other side and then you will know that the value of x is that number. In other words you want to end with the equation x = ? where ? is some number.
So what can you do that maintains the balance? You can add or subtract the same amount to each side and the balance will be maintained. Thus for example in your problem you can subtract 5 from both sides. that is I get
2x + 5 = 17
2x + 5 - 5 = 17 - 5
2x = 12
Hopefully you can see why I chose to subtract 5. Now I am close to just a single x on the left side.
What I do now is divide both sides by 2. This will maintain the balance and I get
2x = 12
2x/2 = 12/2
x = 6
You should now verify that x = 6 is the correct answer. Go back to the original equation, 2x + 5 = 12, and evaluate the left side with x having the value 6. You should get the value of the right side, that is 17.
I hope this helps,