In your next to last line it should say cover A, not cover E.
"Take an open cover of A.
If you add the open set X\A to that, then you have an open cover of K. - dont understand!"
Well, if A is closed then X\A is open and it is all of X except for the part in A. Every point of K is either in A or in X\A because their union is X. Those points of K in A are in the open cover of A and those points of K not in A are in the open set X\A. Maybe it would help if you draw a picture, because not much is going on here.
"Since K is compact, there is a finite subcover. So that subcover also covers A.
Now you don't need the X\A set to cover E. - dont understand!"
What is being talked about is the cover of K consisting of the arbitrary open cover of A together with the single open set X\A. By definition of compactness this open cover of K must have a finite subcover. That single open set X\A only covers the part of K that is outside of A, so the other open sets of that finite subcover must cover the part of K that is inside of A, namely A itself since A was a subset of K. So they form a finite open subcover of A, of the arbitrary open cover of A you started with. So, by the definition of compactness, A is compact.
Note: writing out all those additional details makes it look much harder than it is. What you said above is all you need to say and is very clear and short, just fix the "cover E" part to say "cover A".