Intra-group sales are $12M of which skeptik(is a name) has sold on $10m leaving $2m(1/6)Still in inventory at the year end.The cost of the sales made by hillusion(name) to skeptik was $9m giving hillusion a profit of $3M($12m-$9m).The unrealised element of this is $500000($3M*1/6)
From your question, Hillusion sold $9m stock to Skeptik for $12m, to earn $3m.
Skeptik sold out $10m stock, left $2m stock on inventory, i.e. from the point of view of the Group, 1/6 was kept at inventory at year end. If the profit attrbutable to the stock is not eliminated in the group, the Group profit is overstated.
The total sales of the two companies are $22m, but s a group on consolidation level, intra-sales of $9m are eliminated under consolidation, i.e.
Dr. Sales $9m
Cr. Cost of sales $9m
Also, the intra-group profit also also needed to be elminated. Hillusion made a profit of $3m, but actuall the group had sold out only 5/6 and kept 1/6 as invetory, and so the profit was not realized :
= $3m * 1/6 = $500,000, consolidation entries are required