To simplify the expression
\[ \left(\frac{x}{x-2} - \frac{x}{x+2} - \frac{x^2+4}{4-x^2}\right): \frac{2x + x^2}{(2 - x)^2}, \]
let's first simplify the part inside the parentheses.
Simplify \(\frac{x}{x-2} - \frac{x}{x+2}\):
We need a common denominator for the fractions \(\frac{x}{x-2}\) and \(\frac{x}{x+2}\). The common denominator is \((x-2)(x+2)\):
\[ \frac{x(x+2) - x(x-2)}{(x-2)(x+2)} = \frac{x^2 + 2x - (x^2 - 2x)}{(x-2)(x+2)} = \frac{x^2 + 2x - x^2 + 2x}{(x-2)(x+2)} = \frac{4x}{(x-2)(x+2)}. \]
Simplify \(-\frac{x^2+4}{4-x^2}\):
Recall that \(4 - x^2 = -(x^2 - 4) = -(x-2)(x+2)\). Thus,
\[ -\frac{x^2 + 4}{4 - x^2} = \frac{x^2 + 4}{(x-2)(x+2)}. \]
Combine the above results:
We are now combining \(\frac{4x}{(x-2)(x+2)}\) and \(\frac{x^2 + 4}{(x-2)(x+2)}\):
\[ \frac{4x - (x^2 + 4)}{(x-2)(x+2)} = \frac{4x - x^2 - 4}{(x-2)(x+2)} = \frac{-x^2 + 4x - 4}{(x-2)(x+2)}. \]
The expression now looks like this:
\[ \frac{-x^2 + 4x - 4}{(x-2)(x+2)} : \frac{2x + x^2}{(2 - x)^2}. \]
To divide by a fraction, we multiply by its reciprocal:
\[ = \frac{-x^2 + 4x - 4}{(x-2)(x+2)} \cdot \frac{(2 - x)^2}{2x + x^2}. \]
Simplify \(-x^2 + 4x - 4\):
We can factor it:
\[ -1(x^2 - 4x + 4) = -1(x - 2)^2. \]
Thus, our expression looks like this:
\[ \frac{-1(x - 2)^2}{(x-2)(x+2)} \cdot \frac{(2-x)^2}{2x + x^2}. \]
Now we can simplify:
Recognizing that \(2 - x = -(x - 2)\), we get:
\[ \frac{-1(x - 2)^2}{(x-2)(x + 2)} \cdot \frac{(-(x - 2))^2}{x^2 + 2x}. \]
The \((x-2)\) cancels in the numerator and denominator:
\[ = -\frac{(x - 2) \times (x - 2)^2}{(x + 2)(x^2 + 2x)}. \]
Simplifying gives us:
\[ = -\frac{(x - 2)^2}{(x + 2)(x + 2)} = -\frac{(x - 2)^2}{(x + 2)^2}. \]
Therefore, the final simplified expression is:
\[ -\frac{(x - 2)^2}{(x + 2)^2}. \]