Believe your FRM Handbook is not the 5th edition. Your solution is correct, but quite complex and not clear.
Firstly, the expected credit loss depends on default probabilites but not on default correlation. In contrast, the higher the default correlation, the higher the unexpected credit loss.
So the simple way to do this is as follows:
Portfolio EL = ELa + ELb
ELa = 100 x (1-40%) x 10% = 6m
ELb = 100 x (1-40%) x 20% = 12m
Thus, Portfolio EL = ELa + ELb = 6m + 12m = 18m
This is a very good question. This kind of question is almost in every year, like 2000, 2002, 2003, 2004, 2006 and 2007. More over, there are three questions related to EL and UL in FRM 2007. Please take a look at Example 18.5, 18.6 and 18.7 on page 442 in FRM Handbook 5th edition. they're all from 2007 FRM exam.