Basin of attraction of triangular maps with applications