I think everyone might have guessed that from the fact that they have identical names and writers
For myself, I prefer the original 1958 one, but it's only by a short margin - the Hammer version is excellent in it's own right.
Certainly I regard it as superior to the film versions of the other Quatermass stories, mostly because in those the character of Quatermass himself undergoes such a massive rewrite, changing from our dogged English professor into an arrogant, loud-mouthed Yank wearing a bad toupee.
Quatermass in the Pit is really much closer to the original and Andrew Keir is very good as the professor, frankly a way better actor than Donlevy