Chazal teach that Yaakov actually traveled all the way to Haran and then decided to turn around. Upon reaching Haran he was remorseful that he had passed through Yerushalayim, the place where his forefathers had prayed, and that he had neglected to pray there. Therefore, he decided to turn around and head back. Hashem provided a miracle and Yaakov instantaneously arrived in Yerushalayim. After praying Yaakov was ready to begin traveling back to Haran, but Hashem wanted him to spend the night, so sunset occurred prior to its natural time and Yaakov had to stay the night. (Chullin 91b)
Elsewhere, the Gemara derives from this incident that Yaakov instituted Maariv. (Berachos 26b) Tosefos mention that it is clear from the storyline presented in Chullin that Yaakov davened Maariv prior to sunset. This, say Tosefos, supports the custom to daven prior to sunset and assume the halacha is like Rebbi Yehuda who maintains that one may daven Mincha until Plag HaMincha and Maariv from that point on; and not like the Rabbanan who maintain that one may daven Mincha until nightfall and Maariv from that point on. (Tosefos Berachos 26b) Tosefos do not show how the Rabbanan resolve this issue and that is something of note since in contemporary times we do not paskin with certainty like Rebbi Yehuda. (See Shulchan Aruch O.C. 233 and 235)
I would like to present the following theory to answer how the Rabbanan may read this passage, although I certainly would love to hear if anyone has a better answer. It is fairly clear from the Gemara that if one is traveling from point A to point B, but that he intends to return to point A on the same day, that he follows the Zemanim of point A. The case the Gemara discusses is if a tamei Kohen is on the top of Mt. Carmel and the sun is at eye level, he may descend the mountain to the sea, go to the mikvah and ascend the mountain. He will have been able to have gone to the mikveh prior to sunset and when he reaches the top it will be after twilight. Thus, this Kohain will now be pure and can eat Terumah. (Shabbos 35a; also see Rashba Shabbos 35a) Since the sun was at eye level when he began his descent, that means for people at the base of the mountain it was setting on the horizon. His immersion will be after sunset for those at the base, but prior to sunset for those above the mountain. The only way that this man can be considered to have immersed prior to sunset is if we give him the status of those on the top of the mountain even though he is currently at the base. It seems that this is due to the fact that he is on a quick round trip.
Similarly, Yaakov had reached his destination of Haran. However, he now wanted to make a round trip to Yerushalayim and back. Thus, he would have the status of one from Haran. Haran is assumed to be fairly close to the modern town of Harran and is almost exactly 4 degrees east of Yerushalayim. Although it is also approximately 5 degrees north, since Yaakov's event happened around the vernal equinox, this will not play much of a role in the following calculations. (See Rashi Bereishis 27:9)
The sun travels every degree of our planet in 4 minutes. That means that the sun will set 16 minutes in Haran prior to its setting in Yerushalayim. So, perhaps, Yaakov arrived miraculously in Yerushalayim and decided to pray at the first moment that he could have said Maariv, but based on the Zemanim of Haran and not those of Yerushalayim. It is reasonable that Yaakov would want to daven at the first possible moment since we know the Avos possessed this characteristic of Zerizus, and because it is appropriate to do so. (See Shulchan Aruch O.C. 235) After davening, Yaakov turned to go back to Haran, but Hashem made the sun finish its descent quickly. It was 16 minutes prior to sunset when Yaakov started davening, so there were only a few minutes that it need to shave off the day anyway.