We all already know as standard knowledge that mixing hot water with cold water will raise the temperature and that the opposite applies as well, mixing cold water with hot water will lower the temperature. If water that is 40 degrees celsius is mixed with water that is 20 degrees celsius then the final temperature of the water containing both the warmer water and the cooler water would be at or about 30 degrees celsius.
The temperature between 40 and 20 would be 30 if one cooled the other the same amount that the other one warmed it. Both amounts of water would need to equal each other or the results could differ.