would the sentence

"she has been working at the hospital for 2 years"

or

"she had been working at the hospital for two years"

which is correct?

That depends upon what you mean.

If you're speaking of the present, the first sentence is correct. In other words, "she has been working" means that she has been there for two years.

If you're speaking of a time in the past, the second sentence is correct. For example: "She had been working at the hospital for two years when I met her in 2005."

http://grammar.ccc.commnet.edu/grammar/numbers.htm

=)

Both sentences can be correct, depending on the context and the intended meaning.

The first sentence, "She has been working at the hospital for 2 years," is in the present perfect tense. It indicates that the action of working at the hospital started in the past and is still ongoing at the time of speaking. This sentence suggests that she is still currently working at the hospital.

The second sentence, "She had been working at the hospital for two years," is in the past perfect tense. It indicates that the action of working at the hospital started in the past and was completed before another event took place. This sentence suggests that she worked at the hospital for two years, but the action has already finished or is no longer relevant in the current context.

To determine which sentence is correct, you need to consider the specific situation and timeframe you are describing.