Answer:
 the costs to be assigned to the units transferred out and the units in ending work in process is $562,800 and $49,760 respectively 
Step-by-step explanation:
The computation is shown below:
Cost assign to units transferred out is 
= 40,200 units × $4 + 40,200 units × $10 
= $160,800 + $402,000
= $562,800 
And, the Cost assign to work in progress is 
= 6,220 units × $4 + (6,220 units × 0.40) × $10 
= $24,880 + $24,880
= $49,760
Hence, the costs to be assigned to the units transferred out and the units in ending work in process is $562,800 and $49,760 respectively