I see they have the same pronunciation but does they bear any differences. It seems like 利害 can be pronounced lìhài or lìhai while 厉害 can only be pronounced lìhai.
利害(lìhài) means the gains and losses. These two words have the same pronunciation, but different meaning. So they are used in different situations:
1. Wǒ de mā ya! Nǐ zhōngwén shuō de zhème hǎo, tài lìhai le!
Oh, my god! You speak Chinese so well! Amazing!
2. Léi fēng tóngzhì cóng bù jìjiào gèrén de lì hài déshī.
Lei Feng never cares about personal gains and losses.