I did a reread some time ago, since I came here. Tom's Yeerk came to Jake and made a deal to get back at Visser Three. The Yeerk's job was to get them inside, by using a pretend prisoner. The prisoner wound up being Erek pretending to be cassie. Tom's Yeerk thought it was really Casie, and that the others were riding on her. Visser Three had a Taxxon, who was Ax or Tobias in morph, eat the pretend Cassie, and Tom's Yeerk enjoyed what he thought was revenge against Jake.
Now, he promised to give jake his brother back. And possibly the box, in exchange for the Blade Ship. Visser Three putting him in charge of the ship worked out really well.
Jake was expecting betrayal, and it happened. Rachel's job was to ensure that Tom wasn't taken away, in case of betrayal. It happened, so she wound up killing him.