If the 4 hour layover in miami is on the return then it is needed. When you fly into Miami from MBJ you have to go through customs then, which in Miami is sometimes longer than in Jamaica. Once through customs you have to get your bags then put them back in the checked bags for your airline and then go back through security. Out of that 4 hours, you will be lucky if you have over an hour of sitting and waiting time once you get through it all and up to your gate.
So I would say go for it...especially at that price.