There's always a catch between the simple past and past perfect instances. While both mean the same - that her labor continued for three long hours - there's a subtle difference I see.
When we talk about simple past, the event is actually over and in most cases, it is not linked to the present time when the sentence is spoken or written. On the other hand, if you apply the past perfect, in most cases, it'll have some link/relation/context to the present time when it is spoken/written.
Let me try to build an example on this -
Yeah, I know her story. She has always suffered in her life right from her childhood. She had problem conceiving. Another nail in the coffin was her labor. You know, she was in labor for 3 hours. She is very courageous: all that would not have been possible for the average woman.
She was in labor for 3 hours - matter finished, that period is over. Other than telling the story, the matter has no strong bond with present scenario.
Now read this -
Hey, don't worry. Nothing bad will happen. You have carried it for 9 months and there were no problems. The labor will also go well.
I don't think so. It's hurting like hell.
But didn't you hear that? Mrs. Anderson said what you felt is quite common and it's okay.
Ah, I don't believe that lady.
Why? Mind it! She had been in labour for 3 hours and knows the ins and outs of it! We should trust her.
She had been in labor for 3 hours - the matter is finished but the case is linked.
Again, please note that this is microscopically analyzed and does not tell you the rule of past perfect connecting with present case.
Also, an important note - Here, the period of 3 hours is defined and that's why there's no ambiguity but otherwise, when you see was ...something/where means it happened at least once and on the other hand, had been ...something/where means the process was completed.
I was in New York OVER I had been to New York (-had been shows the process is complete)
A very little difference but an important one I thought I should mention.