I know 6 quart will be water and 4 quart antifreeze so if I drain one quart
I will have 5.4 water and 3.6 antifreeze then I can add 1 antifreeze to make 5.4 w and 4.6 antifreeze. I know I have to do this until I make 5 water and 5 antifreeze.
If you continue this method (it is tedious), drain 1.5 quarts & replace, then drain 2 quarts & replace, then 2.5 quarts & replace, etc.
If you do this, you should become aware of the resulting equation that you are seeking.
AND probably you will never forget how to construct the equation directly from the data given.