Backward chaining algorithm
SUBST(COMPOSE(θ1, θ2), p) = SUBST(θ2,
SUBST(θ1, p))