I think this is Daltons Law Problem

Hi guys, I hope you can help me out with this seemingly simple problem. I honestly tried but I couldn't get any answer:

A 250 ml flask contains oxygen at a pressure of 150 mmHg and another flask contains 500 ml of Nitrogen at a pressure of 135 mmHg. The two flasks were then connected so that each gas filled their combined volumes. Assuming no change in temperature, what is the total pressure of gas in the final mixture?

I think this has to do with Daltons law but I don't know how to solve it.

I think I solved the problem. I believe the key to this problem is that when each of the gas enters the new volume, the pressure by each gas changes. Then taking the final pressure contributed by each gas in the new volume, I added those to give me an answer of 140mmHg.