On the formation of terrestrial planets between two massive planets: the case of 55 Cancri