1. ## Differentiation

How did the next (arrow) step is formed?

2. In the second picture, $(x^2-1)$ has been taken a common factor in the numerator.

Example:
$ab^2-cb^2=b^2(a-c)$.. this term has $b^2$ as its common factor..

$-abc+a^2b^2c^2 = -abc(1-abc)$.. here you are taking -abc as a common factor.

similarly, $-2x(x^2-1)$ is a common factor in picture 1...