Project 5:motor pin mismatch

i just found a problem on my motor that mismatch with the book, the order of the electric line on book is Black/Red/White, but mime motor is Black/White/Red as picture.
which one is correct?

i have change the pin to Black/Red/White, it's working now.