Try getting the visa. If approved, you can come & work with new company. However, while processing your RP, the previous company found out that your not joining them or someone inform them that you are in Qatar. Brace your self for some queries from them or from the immigration, worse is your application being rejected.