How many grams of water at 20.0C are necessary to change 800.0g of water at 90.0C to 50.0C

You want to lower the temperature of the 800 g of 90 C water by 40 C, to 50 C. The heat loss from the hot water will be 800*50 = 40,000 calories, since the specific heat is C = 1.00 cal/(g*C)

The cold water that you add will also end up at 50 C after mixing, and it will have to lose 40,000 calories.
The mass M of cold water must be such that
M*C*30 = 40,000 calories
M = 1333 g