Expect big problems, esp. if it is your home.
The supernova that forms the magnetar will scour all life of any planets orbiting the companion stars of a magnetar. So, a dead planet is the only kind that will be available. Earthsky mentions that 50-100 light years is generally accepted as the closest safe distance for a supernova.
Other than being biologically dead, can there be anything left of the planets. Absolutely, binary stars can have considerable separation distance. The Gleise catalog of 116 nearby stars mentions 14 binary systems separate by over 2000 AU.
At 2000 AU, planets would easily survive (though not the delicate biological squatters). National Geographic mentions planetary survival at a mere 100 AU though with consierable disturbed orbits, whereas the effects at 2000 AU would be 400 times weaker. 1 light year is over 63,000 AU
Where you draw the line at a survivable distance for the planet is your call, but 200-500 AU seems reasonable to me, orbital changes are not necessarily for the worse either. The new orbits would tend to be less circular (a bad thing for the occupants)
Not counting the supernova event, orbital problems at 100 AU separation is so minor as to be simply neglected, gravity from the sibling star is approximately 10,000 times weaker than the parent stars, and the tidal forces are 1,000,000 times weaker.
Capture of another star is exceedingly unlikely, you have to scrub off delta V to capture it, and nothing in the system would have that ability as virtually all gas and debris is long gone with the supernova, thus no significant delta v is possible -- not to mention that a star capture event would be near certain to destroy the accompanying planetary orbits.
A magnetar lasts perhaps 10,000 years as a magnetar, making a star capture even more unlikely. A captured star would almost of necessity be far too close as the farther you get from the magnestar, the less possibility of a delta v change existing.
The magnetic field is also subject to inverse square strength rules. And the magnetic force is far weaker than the gravity force. At 1 AU, the magnetic force is strong enough to erase a credit card, but the gravitic force is strong enough to keep planets in orbit with an acceleration of 0.018 m/sec^2 for 3 solar masses. I did not mention it, because it was just too obvious in my mind.
Question said hard science, this is the way it works. No hand-wavium to capture another star and its planets. There are only about 10 known active magnetars in the galaxy, chance of another star capture in 10,000 years is so close to zero, I doubt it has ever happened in the universe.