Yes - it is a matter of slingshot.
If heavenly bodies do not actually collide then angular momentum and energy are conserved. Heavy bodies can also radiate angular momentum and energy by gravity waves, but this is a very slow process except when they happen to move very near each other.
In two body systems, orbits are closed and the speeds are always the same at the same distance. If two black holes meet each other, they cannot get rid of their energy and momentum - they change their direction of movement but although they accelerate when they approach, they slow down again when they depart, so they end up having exact same relative speed in a different direction. Same thing with a comet approaching Sun - it comes in, it approaches Sun and accelerates, then it passes by, slows down and leaves in a different direction but with the same speed.
If two black holes already are on a bound orbit, they will keep orbiting each other at the same orbit - they cannot approach each other because they cannot get rid of their energy and angular momentum. Same thing with planets - they keep orbiting at the same distance from Sun.
But when you have three bodies, it is possible to change orbits, because they can give energy and angular momentum to each other.
Say a comet happens to pass near Jupiter when it is approaching the Sun.
If the comet passes behind Jupiter then the comet pulls back Jupiter. Jupiter slows down, comes closer to Sun - very little closer because Jupiter is big and comet is small. The comet is pulled by Jupiter and becomes faster, and after passing Sun flies away at a higher speed than before. It is not actually pushed by Jupiter, gravity always pulls, but it is pulled ahead and so it flies away. If the comet happens to pass in front of Jupiter instead, then the comet pulls Jupiter ahead - very little, Jupiter is so big that it still orbits the Sun, just a little further now - and Jupiter pulls comet back so that it starts to orbit close to Sun, or collides with Sun.
Likewise with 3 black holes. The third black hole cannot be pushed, it can only be pulled, but depending on where it passes the other two, it can be pulled ahead so that it flies away. If the third black hole is pulled ahead then the other two are pulled back, so that they either collide and become one big black hole, or else are not pulled just the exact amount to hit each other, and instead continue to orbit each other but now on a smaller orbit.