Hugo spends an entire chapter describing how dismal and dark Valjean's new apartment is, but that's the point. Valjean wants to stay out of the public eye.
Valjean takes Cosette into the apartment and gets her settled in. But Cosette can't forget her harsh life at the Thénardiers', and keeps waking up in the middle of the night ready to sweep the floor.
Only one other apartment in Valjean's building occupied, and of course the person living in this apartment is a very nosy old woman.
For the next while, Valjean and Cosette live in total happiness. Valjean teaches her to read and buys her nice clothes, while Cosette revels in her new life.
The nosy old woman decides to spy on Valjean to find out more about him. (Notice how a lot of the trouble in this book comes from nosy people?)
One day, she looks through his keyhole and sees him pull a ton of money out of the lining of his yellow jacket.
The next time she's tidying his apartment, which she's apparently supposed to do, the woman inspects his coat and feels a bunch of other money inside it. She also searches around and finds a bunch of different wigs. Okay, fair enough, we'd be suspicious if we found those things in our neighbor's coat, too.
Valjean makes a point of always giving money to a beggar who hangs out near his building. One evening, the beggar looks up at him and gives Valjean a huge shock. Valjean is certain that the man is Inspector Javert.
He checks again the next evening, but sees that he was wrong. It's just some random guy.
A few nights later, Valjean hears someone walking around in his building. It's not the old lady, meaning that it's a stranger. Valjean is on edge about the whole thing. He looks out the keyhole and swears that the man has the same figure as Javert. Time to jet.
The next evening, Valjean takes Cosette and leaves the apartment. They walk deep into Paris. It's not long before Valjean looks over his shoulder and sees three men who seem to be following him. He tries to hurry, but the men following him simply speed up their pace.
Eventually, Valjean finds himself trapped with Cosette in an alley with nowhere to go. His only hope is to climb a brick wall and use a rope to pull Cosette up after him. Once he's done this, the two of them lie silently on top of that wall. Valjean can hear the men on the street looking for him, and he confirms that their leader is none other than Inspector Javert.
When the men are gone, Valjean lowers himself and Cosette on the other side of the wall, and he finds himself inside an enclosed garden with an old shed. They spend the night in the shed listening to women's voices singing hymns from a nearby building.
The next morning, Valjean notices someone moving through the garden outside his shed. It's a man who's wearing a bell that tinkles every time he moves. Valjean feels that Cosette's hand is icy cold and that she's unconscious from hypothermia. Desperate, he approaches the old man in the garden and offers him a hundred francs for his help.
The old man instantly recognizes Jean Valjean as Père Madeleine from his days back in Montreuil-sur-mer. The old man is none other than Fauchelevent, who Valjean saved from being crushed to death beneath a cart. Fauchelevent is wearing a bell on his knee because he works inside a convent (which is where they are now) and the bell warns the nuns that a man is coming.
Valjean begs Fauchelevent to give him a place to live on the sly. Turns out that the old man has a cottage that none of the nuns ever comes near. Soon enough, Valjean has put Cosette in a cozy bed and her health has come back.
Once Valjean is settled, we how Inspector Javert tracked him down. He was aware that Valjean was said to be dead, but then he heard how a man in a yellow coat had "stolen" a girl named Cosette from the Thénardiers. Ding ding ding! Javert remembered Valjean asking for an extra three days to save Fantine's child when he was about to be arrested back in Montreuil-sur-mer.
Javert hits a dead end in his investigation until a few years later, when he hears the story of a man in Paris who lives like a poor person but clearly has a lot of money to dish out to beggars. Javert also learns that this man has a small girl living with him. The associations come together and Javert decides to check it out by dressing up as a beggar. Ah-ha! So Valjean did see Javert in the street that one night.
In any case, Javert tries to close in on Valjean, but as we know already, Valjean eludes him by climbing a wall and hiding inside a convent.
The truth is that Javert could have moved on Valjean sooner. But he savored his victory a little too much and let Valjean get away in the process. And this is something Javert's going to have a tough time forgiving himself for, since he is usually by-the-book in everything he does.
Hugo spends the next chunk of the book describing the convent that Jean Valjean is hiding in. These nuns live an super strict life and are barely allowed to speak to relatives, let alone strange men. His general point about the convent is that all things, even religion, have to give way to social progress in the long run.