The Immediate Context
The ESV translation highlights the language a bit better here I feel [I did restructure the second section slightly]:

In the first we see Jacob moving out, working for his bride and then guarding her (by guarding sheep).
In the next we see God moving in to do the work of bringing Israel out of Egypt, securing Israel as his bride, and then guarding him (Israel is actually also being compared to the sheep that Jacob guarded).
The difference, and possibly why it says prophet instead of naming Moses, is that it is Jacob doing it in the first, but it is God doing it to Jacob in the second, just through the agency of a prophet.
In both cases of prophet it is referring to Moses. So we could insert "Moses" but we would be making the mistake the author intended to avoid. The emphasis is that it is God doing it.
In the first case of Israel it is Jacob, but in the second it is the nation. The writer is using Jacob in the first to distinguish he is speaking of just the man, but uses the name Israel in the middle line of both stanzas to highlight it's double meaning.
There are a lot of beautiful subtle meanings at work here as well. The man going out and God bringing in. Israel as a bride and needing to be shepherded as sheep.
The Book Context
As for how this fits in the larger context of Hosea, it is Ephraim who is going out to Assyria to "work" for her sins, but it is God who will bring her back in.
Hosea 9:3 ESV They shall not remain in the land of the LORD,
but Ephraim shall return to Egypt,
and they shall eat unclean food in Assyria.
So in it's prophetic meaning one could argue from a Christian perspective that the prophet is actually Christ, who Moses was a foretype of, who will bring his bride back from exile into the promised land.
Hosea 11:5, 11
5 They shall not return to the land of Egypt,
but Assyria shall be their king,
because they have refused to return to me.
11 they shall come trembling like birds from Egypt,
and like doves from the land of Assyria,
and I will return them to their homes, declares the LORD.