You can try to use chords that are common to both keys, and re-interpret their function. For your example (A minor and B minor), the common triads are D, Em, E, and G (note that in minor both the 6th and the 7th scale degree can be either minor or major). Also note that a ii-V progression always leads nicely to the I chord.
Examples:
|| Am | Dm | Em Em/D | C#m7(b5) F#7 | Bm ||
Note here that that C#m7(b5)
is the same as Em/C#
so you have a nice decending bass line starting on E that naturally leads to the ii chord of B minor.
|| Am | D | G | F#7 | Bm ||
Here, the D and G chords are common to both keys and are therefore ambiguous, which can be used to modulate to B minor.
One simple example of how to switch back to A minor is to use the common chord E7:
|| Bm | E7 | Bm | E7 | Am ||
or
|| Bm | G | D | E7 | Am ||
where all 3 chords between Bm and Am belong to both keys.
Of course there are many other possibilities, and often you just switch by using the appropriate dominant chord of the new key.
Also have a look at this answer to a related question.