One night in 2010, while drunk and waiting for their train at a station the brothers dared each other to cross the tracks. Ryan lost and was hit by a train and killed on the spot. Caleb blamed himself for Ryan's death. He deliberately performed poorly at school to hide the fact that he was a genius.
He began dealing drugs anonymously to support his mother who had become an alcoholic following Ryan's death. Being a computer genius he also began writing a compression algorithm named 17-6-21 that would revolutionize the way people stored data on the internet.
Two years later, Caleb approached his computer teacher, Chris Beckner, to help sell the algorithm and set up a trust fund for his mother. Finch who was posing as Caleb's substitute teacher figured out the meaning of the algorithm's name, 17-6-21, and what Caleb was about to do. Caleb had decided to kill himself at the same age as Ryan, 17 years, 6 months, 21 days by jumping in front of a train.
Finch finds Caleb at the train station and sits down next to him. Finch tells Caleb how similar they are to each other and that they have both made mistakes. He tells Caleb that one cannot run from ones mistakes but but should learn from them. He makes Caleb understand that the world is better off with them in it and that money would not matter to his mother if Caleb were dead. Caleb finally decides not to kill himself and lets the train pass him by.
The next day Finch meets Caleb at the school. This is a very important moment in the series. Caleb is fumbling with his papers at the front entrance. Finch warns Caleb that he really ought to be more careful with his code. Finch then tells Caleb a story about the early days of the internet, mentioning the hacker who changed everything with a home-made personal computer. "All I'm saying is, it is a new era now and things are about to get really weird--so you should keep your code close to your vest." Finch then gives him a print out of the first 3,000 digits of pi while admonishing him to choose his friends wisely. He tells Caleb that his number is in there somewhere and "you're smart. you'll figure it out." As Finch is about to go, Caleb astutely observes that although he had read all the literature on the subject, he never saw anything about a home made personal computer. Caleb asks Finch just how he knows about that. With a knowing gleam in his eye, Finch suggests that he must have heard it somewhere. He leaves Caleb, then, who can be seen with the gears spinning in his head on the entire subject of Finch. (“2πR”)
During their race to save the Machine, Finch and Root break into Caleb's company building to steal the fully developed version of his compression algorithm as instructed by the Machine. Detecting a security breech, Caleb confronts Root while unable to see Finch. When asked why he should trust her, Root responds by saying that he doesn't have to. Finch emerges and greets Caleb, who expresses his surprise and confusion. Finch says how proud he is of Caleb and starts to explain what they need the algorithm for, but Caleb stops him and hands it over, saying he trusts Finch completely. Root also admits that she stole some of the RAM chips from "Project X" which Caleb is surprised she knows about. Both the compression algorithm and RAM chips are later used to save the Machine when it must download itself into the briefcase before Samaritan can shut off all the power, which would have killed her. (“YHWH”)
Caleb's algorithm successfully compressed the Machine's core heuristics into the RAM chips in the briefcase so that she could be rebuilt by Finch and Root. (“SNAFU”)