I want to stack two text frames vertically in such a way that the bottom of the top frame is exactly aligned with the top of the bottom frame. How can I do this?
By default, frames should snap to other frames, and you can always select a frame and set the x and y coordinates in the control panel.
But simply snapping the frames together might not give you the effect you want (I don't know why you want to do this, so I can't say for sure) because text may not fill the top frame leaving the sort of space at the bottom that you are looking for. Auto-fit and first baseline options might give you more control, or you might want to use a two-row table in a single frame.