The question is asking you to state the GENERAL trend - GENERALLY across a period, the ionisation energy increases, but there are exceptions obviously.
When you covered periodicity, you learnt that there are 2 exceptions to this trend in Period 3. Ionisation energy decreases between Magnesium (Group 2) and Aluminium (Group 3) as well as between Phosphorus (Group 5) and Sulfur (Group 6).
However, this doesn’t only just happen in Period 3. Across all periods, there are exceptions to the general trend of IE increasing, and these exceptions are mainly between the Group 2 and Group 3 elements, and Group 5 and Group 6 elements.
Nitrogen is in Group 5 and Oxygen is in Group 6, meaning there’s some sort of deviation happening here.
Write out the electric configuration for Nitrogen and Oxygen.
Nitrogen is 1s2 2s2 2p3
Oxygen is 1s2 2s2 2p4
There are 3 p orbitals. Each orbital is filled once before it can have a second electron in it.
In Nitrogen, each p orbital has 1 electron.
In Oxygen, you have 4 electrons. All 3 p orbitals will have 1 electron each first, but as there’s a 4th electron, this occupies the first orbital. This means the first p orbital is doubly filled/has paired electrons. You’re right in saying that the repulsion causes the paired electron to be lost more easily. This means Oxygen will have a lower IE compared to Nitrogen, hence it deviates from the general trend.