Surely both names are equally old, at least as far as we can tell.
The name Hannah appears in 1st Samuel 1-2, and various Yohanans/Johanans gets passing mentions in 2nd Kings, 1st & 2nd Chronicles, Ezra, Nehemiah and Jeremiah.
The oldest copies of any of these we have are the Dead Sea Scrolls, which date from 200BCE. Textual analysis can give us an idea on the order the books were written, but bear in mind that heavy editing has taken place throughout the bible's history, particularly during the Babylonian Exile. Therefore, I think we should be careful about assuming that a name that appears earlier in the Bible was recorded earlier.