Compare the formula on the right.
Quadratic coefficient and quadratic coefficient are equal.
The linear term coefficient is equal to the linear term coefficient.
Constant term and constant term are equal.
That is, n-m=5.
mn=-6
The required formula is equal to -6+5-6=-7.