(a) As the north pole of both the magnets are facing each other so they will repel. The magnetic field lines between the two magnets are shown below:
(b) As opposite poles of both the magnets are facing each other so they will attract. The magnetic field lines between the two magnets are shown below: