The following is written just before the boundary theorem in Guillemin & Pollack :
But I see that if Z is not transversal to X this is not true,why the book did not consider this case? why the book build the boundary theorem on the transversality case only? could anyone explain this for me please?
Boundary Theorem: suppose that $X$ is the boundary of some manifold $W$ and $g: X \to Y$ is a smooth map. If $g$ may be extended to all of $W$ then $I_2 (g,Z)=0$ for any closed submanifold $Z$ in $Y$ of complementary dimension.

They first build a map which is an extension of the map g on the W and then by using The Transversality Homotopy Theorem they ensure the transversality and Showed that the restriction of those two homotopic maps to the boundary are also homotopic, and so the theorem follows.