Hi,
She told me that she bought a new car the day before.
A: We realized that we had lost our way.
B: We realized that we lost our way.
C: She told me that she had bought a new car the day before.
D: She told me that she bought a new car the day before.
I think A and B is the same in meaning, Yes
but how about C and D? Yes
Is D the right sentence? It's a correct sentence. Are C and D the same in meaning? Yes. D just states the sequence of events more explicitly.
Best wishes, Clive