You are correct. The reason your snake is active during the day is because he is stressed. Snakes are solitary animals and only come together to breed. Anytime there are more than one living together, one will be the dominant, getting all the best spots, hides, food, etc, and the other won't. Once separated, he should relax.
There are several ways you can separate them. You can put them in entirely separate tanks or tubs. Or, if their tank is big enough, you can use cardboard or something as a partition to divide the tank and set up each side as a separate tank...
Rob