MatrixPower[Inverse[{{p, -p, 0}, {0, 1 - p, -(1 - p)}, {-(1 - p), 0, 1}}], 2] . {{0}, {0}, {p}}