Suppose $A$ and $B$ are contractible pointed open subspaces of $X$. The Mayer-Vietoris sequence implies that the boundary morphism $\delta: H_n(X)\to H_{n-1}(A\cap B)$ is an isomorphism.

I wonder, if $x$ is a $n-1$-cycle of $A\cap B$, is there an explicit algorithm to write down its $n$-cycle preimage $\delta^{-1} x$?