You capture a piece which defends an opponnent piece i.e. you remove the defender.
So this piece became undefended .
Black Knight defends the Rook . Bishop captures it , Black King captures the Bishop. 1. Bxe7 Kxe7 then see: diagram 2
Now Black Rook is undefended and White Rook captures the opponent Rook. 2. Rxf5