Problem

Ahimelech son of Abiathar or Abiathar son of Ahimelech?

*There is some context of how I got to this point that I felt like saying but it isn't relevant to the question

"And one of the sons of Ahimelech the son of Ahitub, named Abiathar, escaped, and fled after David." 1 Samuel 22:20

-This is a clear interpretation that Abiathar is the son of Ahimelech (and what I think is true)

"And Zadok the son of Ahitub, and Abimelech the son of Abiathar, were the priests; and Shavsha was scribe;" 1 Chronicles 18:16

-I read this as saying Abimelech is the son of Abiathar.

*I know Samuel says Ahimelech and Chronicles says Abimelech, but there is a site that claims it is interchageable.

https://www.gotquestions.org/Abimelech-Bible.html :
"The NAS, KJV, and NET Bibles put the name as Abimelech. But the NIV, ESV, and HCS Bibles have Ahimelech (or Ahimelek)"

Possibilties

-it could be that Abiathar named his son after his father but changed the spelling
-it could be that the gotquestions site is incorrect in some way and they are different people. (Implying Abiathar named his son after his father again)
-it could be I am misreading the Chronicles verse