
$$\halign{
\hfil$#$ & $= {#}\hfil$ \cr
m  &  { N{\cal B} - {\cal XY}  \over  N{\cal A} - {\cal X}^2 } \cr
   &  { N(p{\cal A} + q{\cal X}) - {\cal X}(p{\cal X} + qN)  \over  N{\cal A} - {\cal X}^2 } \cr
   &  { pN{\cal A} + qN{\cal X} - p{\cal X}^2 - qN{\cal X}  \over  N{\cal A} - {\cal X}^2 } \cr
   &  { pN{\cal A}             - p{\cal X}^2   \over  N{\cal A} - {\cal X}^2 } \cr
%   &  { p(N{\cal A}             - {\cal X}^2)   \over  N{\cal A} - {\cal X}^2 } \cr
   &  p \cr
}$$