The Holy Prophet was the son to Abdullah who was the son of Abdul Muttalib. Abdullah and Abu Talib were real brothers. Abu Talib was thus the real paternal uncle of the Holy Prophet of Islam. Ali was the first cousin of the Holy Prophet. The Holy Prophet and Ali had a common grandfather Abdul Muttalib.
Abdul Muttalib was the son of Hashim who was the son of Abd Manaf who was the son of Qussay who was the son of Murrah, who was the son of Kaab, who was the son of Luayy, who was the son of Ghalib, who was the son of Fihr, who was the son of Malik who was the son of Nadr, who was the son of Kananah. Beyond Kananah the ancestry extended to Ismail, and Ibrahim, who flourished some 2500 years earlier.