Two magnets are used to magnetize a soft iron bar PQ as illustrated in the…