You are comparing side AB, angle ABD, and side BD in one triangle to side CB, angle CBD, and side BD in the other triangle. That is, you are comparing a Side, Angle, and Side in each triangle. The SAS postulate is the reason the triangles are congruent.