Muhammad was trying to convince the Jews he's the real profit, but when they refused to accept him, he started by killing their tribes & changed his direction to Mecca. He also had limited knowledge of Judaism & Christianity. He was illiterate and his knowledge came form what he heard on his travel (while running his wife's business.) since they prayed to Jerusalem, he adopted it. You can read all about it in the Hadith. Or pick up "A Letter to Muslims" short & easy read about the Koran & Hadith.