I’ve often heard that the strength of a magnetic field varies approximately as the reciprocal of the cube of distance. I can see why this would be true for the force felt by another magnet (the effects of the two poles partially cancel), but why is this true for a magnet and a piece of iron, since both poles attract?
You’re misunderstanding the nature of the attraction. The magnet doesn’t say “hey, you! c’mere!” The magnetic field induces the iron atoms to line up with each other, which turns the iron itself into a bit of a magnet, which (as I wave my hands wildly) behaves more or less like you think happens with two magnets.
An easier effect to calculate, which gives essentially the answer you want after understanding some Deep Magic about EM fields, is an electric dipole. Say you’ve got a charge of +1 at the point (0,0,1) and -1 at the point (0,0,-1). Now calculate the electric field by adding the two together. See how it behaves at points like (x,0,0).