Hognose snakes can withstand rather small spaces, but depending on how long, and including another snake, im not sure. They can live healthy, and from my knowledge, happy
. As you know since you have two, they are pretty slow snakes, so they dont move much.
They do not climb too often either, so they may not be bothered by a small tank, but i would seperate them unless you are breeding the pair, and maybe put each one in a 10 gallon tank. 10 gallon tanks you can get for as cheap as $13.00. But i would suggest seperation.