Coglueing homotopy equivalences