Answer to magnetism problem