Exchanging R+p for N+B

Sort:
praxis

Sometimes in a game (typically but not exclusively attacking castled king) there's an opportunity for the above exchange.

Although of approx equal value losing e.g. the N+B puts you a piece down (yes, I know the Rook is more powerful, & the extra pawn may eventually count ofr something), BUT the question I'm asking is what sort of game should you ideally be seeking to play and/or what sort of startegies/positions should you be trying to develop (& any annotated games; books etc that deal with this at a 'middling' 1500-1700 say level):

a) if you've lost the R+p

b) if you've lost the B+N.

Sorry if this is a bit obtuse but any comment/help etc appreciated.