Any kind of metal polish will get rid of the yellow. You can even do it by hand with a little elbow grease. Or one of the polishing balls Mothers sell or something like it.
I use the same dirty black buffer to do mine when I'm polishing aluminum.
Wetsand with a 1500 make sure you get a even dull finnish. Pepboys should have it or go to a paint shop.
Finish up with a buffer (careful not to melt the plastic) and fine paint compound, or plastic polish. you do it by hand too but it will just take a little longer.
Since your headlights has wore thru the coating they will dull fairly quickly now.
There are products out the now that will recoat and protect the plastic.
The kit by 3M rocks. Part number is 39008, and they have a piece to chuck in your drill with some sanding discs from 500 to 3,000 grit and also compound and a polishing pad. I have used it several times with excellent results. Basically, get all the yellow off with the 500 grit, then the rest of the grits will get the scratches out. I keep the lens very wet while doing this to wash away any slurry. When I finish with the 3M kit, I always clearcoat the lenses to keep them looking better longer. Napa has the kits on sale this week for $16.99 here also. Here is the kit along with a how-to video. http://solutions.3m.com/wps/portal/3M/en_US/Car/Care/DIY_Projects/Appearance/Restoring_a_Headlight/