You can indeed rack off beer A and pour new wort right on top of beer A's yeast cake, trub and all.
The second beer should be bigger in all ways so that the flavors from beer A do not overwhelm beer B.
There are a few people around that are vehemently opposed to this practice since it is overpitching considerably for most beer. I racked a 2.5 gallon of BW on the cake of a 5 gallon pale ale. I seemed to work very well.
In addition, if your sanitation practices are not strong, you could be introuble doing this...
I would say do it once and then read this: http://www.homebrewtalk.com/f163/yeast-washing-illustrated-41768/