Here's my mediocre attempt. Handpolish for 15 minutes per lamp using cheap scratch remover on my 7 years old altis headlamp. The yellowish tinge is still there but overall looks OK to me. Can't it expect to look brand new. As long as not foggy and dull should be just fine with me.
If just yellow can also just polish with the plastic polish I showed earlier, but if turn deep yellow and especially have or feel a cracked layer on top you will need to sand it down first to get a good finish.
Actually I did my second headlamps last week have not loaded up the pictures yet....