Generally speaking, this will be unrealistic unless the escape pod was actively trying to match orbits with the asteroid before this happened.
The big issue is that closing velocities in space are really big. In 2009 there was a collision between satellites at 11,000m/s. That's 26,000 mph. In most cases, you're just going to have a flyby.
However, we can explore what a "capture" would look like. The easiest way to visualize it is from the perspective of the asteroid itself, which is applying a force akin to gravity (meaning the force is proportional to the inverse square of the distance).
For these sorts of forces and a 2-body problem (the asteroid and the pod), Kepler Orbits are what you're looking at. What he showed was that, for these forces, there are only a handful of shapes that can emerge, which are all conic sections:
- A line (this will result in the asteroid plowing straight through your pod, which is probably not what you're after. Most of orbital physics ignores this extreme case).
- A circle
- An ellipse
- a parabola
- a hyperbola
These are the only shapes possible. The hyperbolic and parabolic trajectories are both escape trajectories, so you will want to focus on the circular and elliptical ones.
If you look at his equations, the key variable for what you are interested is eccentricity. It separates these shapes:
- $e$ = $0$ is a circle
- $0$ < $e$ < $1$ is an ellipse
- $e$ = $1$ is a parabola
- $e$ > $1$ is a hyperbola.
This tells is what we're solving for. If $e$ is less than 1, we can talk about "capture." If its greater than one, we're just changing directions, nothing more. Indeed, the parabolic orbit is sometimes known as the "escape" orbit or the "capture" orbit because it's right on the line between these behaviors.
On a parabolic orbit, the velocity is defined to be $v=\sqrt{\frac{2\mu}{r}}$, where $\mu$ is the standard gravitational parameter $GM$ where $G$ is Newton's gravitational constant and $M$ is the mass of the asteroid. Thus, for any given distance between your pod and the asteroid, we can find the maximum relative velocity that the pod can have. Any higher, and it escapes. Of course, this is not easy to intuit about. It will be easier to phrase this as $v=2v_0$, where $v_0$ is the velocity of a circular orbit. We have a bit better intuition about how things orbit circularly so its easier to think these things through.
The Earth's pull currently holds the ISS in orbit at about 400 km above the surface, which is 6,700 km from the center. The ISS is traveling at about 7.6 km/s. Putting that into the eqations above, we can see how it can be adjusted.
- If we wanted to orbit an object with 100th the mass (and thus 100th the attractive forces), at the same distance, we would have to be going 10 times slower, a mere 760 m/s.
- If we wanted to get captured from a greater distance, we have to increase the forces accordingly (by increasing mass, if we're using gravity, or some other attribute if we're using something like magnetics). To get captured at twice the distance, you need twice the mass.
- Once we have this "circular orbit" velocity, we can double that, and that's the velocity of a parabolic "capture" orbit. Thats the highest relative velocity your spacraft can have.
Now, this last bit steps a bit away from the physics, and into worldbuilding. Is the escape pod owner surprised by this asteroid? Large asteroids are typically well documented. Asteroids which have a tendency to magnetically attract other asteroids would also be typically documented because they would generate all sorts of complex trajectories. And finally, close-approaching objects are typically well known. One would generally know all of the objects which are approaching within 1000 km in the next month with great certainty.
So the question will be whether you can manipulate the gravitational and magnetic effects of this asteroid such that the asteroid wouldn't have been known about when the pod is released. If it was known about, then we're dealing with an intentional orbital insertion, and we have a lot more room (in particular, thrusters tend to fire).
The answer is probably "no, we can't," but the worldbuilding answer might look at how to craft their situation such that its reasonable that they didn't know about something they should have.
Just remember. Space is big. Really really big. Mindbogglingly big. If you're looking for realism, you may find that the raw size of space makes some survival plans highly unlikely! And that's a good thing. Because if asteroids big enough to capture someone were common, the Earth would get pelted a whole lot more than it does today!