# Clarification of bra-ket notation [duplicate]

How do I get from equation 1.31 to equation 1.32? It seems like some terms are changing.