Let x be amount of pure antifreeze (100%) you need to replace and there you would have 10-x left (30%) in the radiator after it's drained. It is still 10 quarts (50%) at the end.
x*100%+(10-x)*30%=10*50%
x+3-0.3x=5
0.7x=2
x=2.86 quarts approximately