“Homecoming” is episode two of season seven of Stargate SG-1.
In the previous episode, “Fallen”, Daniel had been returned to being human. Jack and Sam had managed to destroy Anubis’ major weapons, but Jonas was captured. Now Anubis has taken his mothership to Jonas’ home of Kelowna, for he is interested in naquadria.
Kelowna contacts the SGC asking for help against Anubis. They did not part on the best terms in the past – after all, Daniel (sort of) died on Kelowna in “Meridian” (admittedly, he got better from this death) and they tried blaming him for something they did.
Lord Wu, the most powerful of the remaining System Lords, who had agreed to attack Anubis after his main weapon was disabled, did not arrive and is behaving increasingly erratically. So an alliance is made with Ba’al. O’Neill is not happy with that. Hardly surprising; Ba’al did capture O’Neill in “Abyss” and repeatedly torture him to death. That sort of thing can really put a crimp in a relationship.