The difference between the Pharisees and the Sadducees are mentioned by Jewish Priest Josephus and also New Testament.
The Pharisees - The Pharisees, the scribes, and everyone belonging to the sect of the Pharisees obeyed Traditions of the Elders. Traditions of Elders is also known as Traditions of our fathers (Galatians 1:14) or Traditions of our forefathers by Jewish Priest Josephus (Antiquities of Jews Book XIII.X.VI).
Jesus Christ severely criticized the Pharisees and the scribes for obeying Traditions of the Elders which nullified the word of God (Matthew 15, Mark 7). That's why the biggest opponents of Jesus Christ were the scribes and the Pharisees (Matthew 23, Luke 11).
Traditions of the Elders later came to be known as Talmud. This is also agreed by Jewish society.
Rabbi Michael Rodkinson - "The Talmud, then, is the written form of that which, in the time of Jesus, was called the Traditions of the Elders, and to which he makes frequent allusions" (Source - The History of the Talmud, Vol. II, page 70, Chapter IX).
The Sadducees - One of the major differences between the Pharisees and Sadducees is that the Sadducees rejected Traditions of the Elders (a.k.a Traditions of our forefathers).
Here is the information from Jewish Priest Josephus.
"What I would now explain is this, that the Pharisees have delivered to the people a great many observances by succession from their fathers, which are not written in the laws of Moses; and for that reason it is that the Sadducees reject them, and say that we are to esteem those observances to be obligatory which are in the written word, but are not to observe what are derived from the tradition of our forefathers." (Antiquities of Jews Book XIII.X.VI).
Although the Sadducees encouraged to learn the laws of God given through Moses and the rest of the Old Testament, still they never kept it. They had their own doctrine. In the doctrine of Sadducees, they rejected the existence of the spirits, angels, and resurrection while Pharisees acknowledged the existence of the spirits, angels, and resurrection (Acts 23:8).
That's why Jesus Christ tells his disciples to be beware of the doctrines of the Pharisees and the Sadducees (Matthew 16:12). Jesus Christ also tells the Sadducees how they don't know both the scriptures of God and the power of God (Matthew 22:8).
That's why we see Jesus Christ saying this.
John 5:46-47 (NIV) - "If you believed Moses, you would believe me, for he wrote about me. But since you do not believe what he wrote, how are you going to believe what I say?”
John 7:19 (NIV) - "Has not Moses given you the law? Yet not one of you keeps the law. Why are you trying to kill me?”