With 5 core flex between the Nest heatlink and the boiler:
Colour - Boiler - Nest Heatlink
Green/Yellow: Boiler earth - Nest earth
Brown: Boiler L - Nest L
Blue: Boiler N - Nest N
Black - Boiler Room Stat - Nest 2
Grey - Boiler Room Stat - Nest 3
Doesn't matter which way round the wires at the boiler room stat terminals are.
If using 3 core flex, then the existing 3 core is for E-L-N as above, then another separate piece of 3 core flex is
Green/Yellow: Boiler earth - Nest earth
Blue- Boiler Room Stat - Nest 2
Brown - Boiler Room Stat - Nest 3
However if the existing mess was installed by someone you paid, then they should be the ones installing it properly, or you need a refund from them.