No, the solution would have been to not divorce. Read Jesus' counsel in Matthew 19. The hard teaching that we are to accept, but not everyone is able to, is that married couples are to stay married.
6...what God has joined together, let man not separate.”
9...whoever divorces his wife, except...