In Chapter 42 of The Adventures of Huckleberry Finn, Tom reveals that Jim has been free all along. In the previous answer, pohnpei397 offered one way of interpreting the characters’ reactions. Another recent theory suggests that we can understand Huck and Jim differently. For years people have believed that Twain wrote Jim as guileless and naïve, in what would be a fairly racist depiction of African Americans, but now some critics believe that Jim is an African American character who cleverly plays into racial stereotypes in order to secure Huck and Tom’s trust and assistance. Additionally, you can read Huck’s response to Tom’s deception as showing Huck’s awakening conscience.
As pohnpei397 pointed out, Jim’s reaction depicts him as overjoyed and superstitious. He reiterates his belief that “signs is signs” (Chapter the Last). However many instances of Jim’s superstitious beliefs result in Jim fooling Huck or Tom or others in a way that benefits him, like the “witch” prank that Huck and Tom play on Jim in Chapter 2. Although it seems like Jim has been fooled, he comes away with a five cent piece, suggesting that his belief in magic is just an act. Additionally, you might consider that Jim does not have a lot of other options available to him. He can’t be, or at least show, how angry and frustrated he is by his treatment. Jim should have been free two months ago, but instead has been forced to play a humiliating game of pretend with Huck and Tom until he fulfills Tom’s romanticized ideals of what slavery looks like. Notably, Jim does not thank Huck or Tom or even comment on his freedom. Jim has to act happy and he has to be polite. His response focuses solely on the money he has received from Tom, possibly indicating that he doesn’t want to have to talk about, or fake gratitude for, his treatment.
Huck also doesn’t say much about what he thinks of Tom’s plan. However, “[t]he first time I catched Tom, private” (Chapter the Last), Huck demands to know what Tom was thinking and what he had planned to do. Throughout the book, Huck does not often question Tom’s plans, frequently thinking that Tom is just smarter or better than he is, so this actually marks a turning point in Huck’s understanding of Tom and of civilization. Huck now seems aware of Tom’s thoughtlessness to the point where he actively questions Tom’s decision making, and no longer thinks that Tom must know better than him “with his bringing-up” (Chapter 42). After hearing Tom’s plan for “adventures plumb to the mouth of the river,” Huck’s comment is “I reckoned it was about as well the way it was” (Chapter the Last). Like Jim, Huck’s response is understated and his reluctance to talk about it indicates how uncomfortable he is with what has happened. This is reinforced by the last two lines of the book. Huck runs away from civilization, and in context, implicitly from Tom and what he represents—thoughtless and thinking of another human being as a toy or amusement.
You seem to be talking about what happens in the last two chapters, where Tom reveals that Jim has been free all along because Miss Watson has died and freed him in her will.
Huck reacts by saying that now he finally understands how Tom could have helped to "free" Jim. He thought all along that Tom had been brought up too "well" to help free a slave. This shows how Huck still struggles to get free of society's values. He still thinks "good" people obey societal values and that he himself is bad because he doesn't.
Jim reacts by saying this proves he was right in his superstitions. This fits Jim's personality because he is portrayed throughout the book as believing in supernatural things, omens and such.