Excessive bleach is the most common reason for white clothes turning yellow.
There may other reasons as well.
To remove these stains from your clothes,
you can use the RIT color extractor OR RIT color remover,
easily available in the market.
To prevent from clothes turning yellow,
you can keep certain things in mind,
Always wash white clothes seperately,
wash all the white clothes in one turn,
but do not add any colored clothes to the washing machine,
while you are washing them.
Use less bleach,
and wash with luke warm water.
I hope this helps you a lot.