Before starting sort out the fabric content first.
Polyester has different properties from say cotton. For one the thing is famously hydrophilic (resists water) and loves oil. If you've ever gotten salad oil on say a polyester tablecloth you know how bad things can get.
If pillow slips are already clean I'd start by first giving them a quick pre-wash with perhaps some STPP if you can find it. Purpose here is to strip out detergent residue that can also make things seem dingy looking.
Since or once the pillow slips are (already) clean, what you want is to reverse/bleach out the yellowing. For this there are a few methods.
One calls for dissolving Oxiclean, sodium percarbonate, sodium perborate into a tub (not metal) of water, then adding more warm to hot water to fill. Then immersing the item or items and allow them to soak for several hours/overnight. Every now and then agitate/push down the items.
After about 12 hours or more (oxygen bleach will remain active for some time in solution), lift items or items out and examine. If no change put back into soaking tub and continue. After about 24 hours if there isn't a change, you'll need to make up another batch of soaking solution as all the oxygen bleach power has been spent.
The other method calls for dissolving oxygen bleach in a non metal pot (stainless steel will work, but not aluminum) filled with some water, then add enough water that will cover items/item. Put pot over burner and allow to slowly reach temp of about 180F. Do not fill pot more than 3/4's full and keep an eye on things. As the water reaching hot to boiling items will float up and the oxygen bleach will froth, both can cause a "boil over" mess if not careful.
Boil for one half hour, then turn off and cover. Heat accelerates the bleaching power of all hydrogen peroxide bleaches. So instead of soaking for 12, 24 or whatever long hours, you can cut that time down to a few. OTOH boiling is harsh on textiles especially in an alkaline environment.
Either way when satisfied with results, and or feel things are about as good as they are going to get, remove things from boiling/soaking pot and rinse thoroughly. You can do this in washing machine or by hand, but all the chemicals used in soaking must be washed out.
Or:
https://www.wikihow.com/Remove-Sweat-Stains-from-Sheets