(* Cross checking the result of the MIMO pole placement using the Sylvester matrix *)

DD = {{s^2,0},{0 ,s}};

NN = {{1, 1},{0, 1}};

AA ={{s+7,-17},{0,s+2}};

BB = {{17 s +15,-15},{0,5}};

AA.DD+BB.NN//Expand//MatrixForm

res =AA.DD+BB.NN //Expand //Diagonal;

s/.Solve[#,s]& /@ Thread[res == {0,0}]//N

Am = {{0,1,0},{0,0,0},{0,0,0}}

Bm = {{0,0},{1,0},{0,1}}

Cm = {{1,0,1},{0,0,1}}

Cm.Inverse[s IdentityMatrix[3]-Am].Bm