These two phrases on the one hand mean the same thing. On the other hand, the repeated emphasis on both "father" and "mother" explicitly includes women in the whole teaching-learning process. (See: [[rc://en/ta/man/jit/figs-parallelism]])
This figure of speech is using the negative "forsake" to mean the positive "obey." Alternate translation: "obey the teaching of your mother" (See: [[rc://en/ta/man/jit/figs-litotes]])