We can’t ever assume someone is in hell. We don’t know where they have ended up for sure. So, pray, not knowing. If they are, in fact, in hell, your prayers cannot help them. However, your prayers will not be wasted. God will use them for someone else who can profit from them.