Extendability Theorem for Intersection Numbers

Theorem
Let $X = \partial W$ be a smooth manifold which is the boundary of a smooth compact manifold $W$.

Let:
 * $Y$ be a smooth manifold
 * $Z$ be a closed smooth submanifold of $Y$
 * $f: X \to Y$ be a smooth map.

Let there exist a smooth map $g: W \to Y$ such that $g \restriction_X = f$.

Then:
 * $\map I {f, Z} = 0$

where $\map I {f, Z}$ is the intersection number.