2 and 5 is correct. But which way round? Don't say it doesn't matter, there is a correct way
If it is a Master Socket then the incoming pair are terminated on A and B, NOT 2 and 5.... If there is no A and B terminals then it is not an Approved Master socket.
Which way round does not matter with most equipment ( modems, routers, telephones etc etc ) will work with either polarity. Some equipment does require correct polarity but the engineers installing these devices will know this and will, if necessary correct, the polarity.
When the phone is not in use :-
A wire white 0 volt terminal 5 ( approximately Ground potential )
B wire orange -48 volt terminal 2 ( 48 volts below Ground potential )
Voltage between A and B is :-
-48 volt when the phone is On Hook ( not busy )
-9 volt ( approx ) when the phone is Off Hook
The following "lessons" are generally correct. ( but they ignore the fact that the Master Socket and it's installation are OpenReach property and service )
Short lesson here
Mire detailed lesson here