For without repetation, as we must include a and E only one place will be left, a and E can be arranged in 3 places in 3 p 2 ways, we have three letters now so 3 p 2 * 3 = 18
Don't take 3 c 2, as we are doing arrangements not selectetion so order matters.
For repetation allowed
We can arrange a and E in 3 p 2 ways, one place is left, we have 5 letters so it will be 3 p 2 * 5 = 30
when you are taking ae and filling the third place with a,e also ,then there will be 6 strings double counted. So answer will be 24. ( 30 - 6)