The service your question refers to occurs in Book the Second, Chapter Three, which describes the trial of Charles Darnay for treason. At one stage of the proceedings, the conviction of Darnay is dependent upon his identification by one witness. What Carton notices is that both he and Darnay have a very similar physical appearance, and pointing this out means that Stryver is able to successfully show the witness to be unclear about his positive identification of Darnay:
The upshot of which was, to smash this witness like a crockery vessel, and shiver his part of the case to useless lumber.
What is key to focus on is the way that it is Carton's similarity with Darnay that rescues him from being falsely convicted of treason. This of course is used to foreshadow the ending of this tremendous Dickensian classic, when their likeness is again used to save Darnay from wrongful punishment, but only by Carton sacrificing himself in Darnay's stead.