At the beginning of the novel, Jim and Huck's relationship was much different than from when they were working and traveling together. There are many examples of how they were not very close at the beginning, even though Jim was Miss Watson's slave and Miss Watson was helping the widow Douglas "sivilize" (p. 13) Huck.
The first time we meet Jim, it is when Huck sneaks out to go meet Tom Sawyer and the "Band of Robbers." Huck doesn't speak to Jim. He just lies on the ground so that Jim can't see him. He gets up when Jim leaves. The next time we see Jim, it is at the end of chapter four. When they meet, they are fiddling around with Jim's hair ball doing some kind of African superstition. Whenever they meet before they see each other on Jackson's Island, there doesn't seem to be a mutual friendship between Jim and Huck.
We can tell this because when Jim and Huck are having a conversation, there is a very casual exchange of ideas. There is also very little exchange of emotions.
On the other hand, once they meet on Jackson's Island, there is a noticeable feeling of camaraderie between the two of them. You can tell that because they share the work when they set up their cave so that they can live in it and keep all of their possessions in it. The cooperation is evident because of the constant use of the word "we", not just "I" or "Jim." When they are setting up it says, "So we went back and got the canoe...Then we hunted up a place close by to hide the canoe...We took some fish off the lines..." (p. 59). You can tell they are...