As already stated, best solution is to try and transfer to his sponsorship while you're still here. Otherwise, ensure you get a NOC from you employer to enable you to return to Qatar once you've left.