Stepwise, a key to the success
Start with any two components, say ice and water. Ice will melt, yes? Does 150g of water at 40°C contain enough heat to melt all the ice? If it does, you will end with just water, and you can easily calculate the final temperature. If it doesn't, you will end with a mixture at 0°C and you should be able to calculate how much water/ice is present.
Then proceed further - if it was just water, check if it can absorb all energy from the condensation. If so - you have just water, and finding the final temperature is simple. If it was a mixture - choose any two components of different temperatures again and proceed exactly as you would do if the third component was absent.