最后:It means "at last" "in the end" "finally" When we use this word,it usually shows the reslut for one thing.
例如:我昨天去购物了,最后我什么也没买
eg:I went shopping yesterday,finally I don't buy anything
终于:It is similar to 最后。But this word used to express great emotion or desire for something you want or you are doing.
例如:我终于买到了冰激凌(表达了我对冰激凌的渴望)
Finally I buy tht ice-cream(great desire for ice-cream)
我终于完成了作业(表达了一种辛苦的情绪,也许作业太多了;也许我要和我的朋友们踢球,所以急着先完成我的作业)
Finally I finished homework(It show emotion I feel very hard,maybe there is too much homework;maybe I want to play football with my friends,so I finish my homework in a hurry at first)