If your friend came to Qatar sometime in June, he/she was able to renew/extend the visa 2x which is the maximum.

She/he needs to exit Qatar to Dubai and come back with a new visa. You need to coordinate with a travel agency to do this...no other way.

Good Luck.