How do I perform this division?

2x-7divided by -x-21+2x squared

Are you sure you don't mean

-x- 21 +2x^2
divided by 2x - 7?
Review polynomial long division, or just try factoring it. The answer is
x + 3.

If you really mean 2x-7 divided by -x-21+2x^2, the answer is 1/(x+3)