The magnetic field (induction) B1 due to bar magnet 1 is in the direction as shown. The magnetic field B2 due to bar magnet 2 is also in the same direction.
As Earth's South is actually magnetic North pole, So the Earth's magnetic field is also in the same direction. So effective magnetic field at the midpoint O of the line joining the centers of two magnets is the addition of all the three fields.
The formula for the magnetic field due to a bar magnet, of magnetic moment M and magnetic length 2 L, at a point, d distance away from its center, and on the perpendicular bisector of the magnetic axis: