I hate magnetism (recently learned it at school 💀)
So, to the best of my knowledge, when the coil is connected to a cell and a current goes through it a magnetic field is created. It would be the same for Q and P shouldn’t it?
Would those magnetic fields interact? Possibly.
Are there any options you can discount? And would drawing a diagram help?