Given that A has limited labour and is working at full capacity, then for every unit of X that they make they will lose sales of Y. Each unit of X takes 6 hours to make and every unit of Y takes 4 hours to make. Therefore making 1 unit of X will lose sales of 6/4 units of X and lose the contribution that would have been made from X.
I work through a similar example in my free lectures on transfer pricing.