The first example is not quite right. We can use was when we are talking about John's state at a point in time:
Ten months ago (we are thinking about a particular point in time) John was living in London.
Ten months ago John was single.
Ten months ago John was a chef.
Ten months ago John was unemployed.
Note that in the last example we talk about his being unemployed at that point in time.
When we talk about a condition that lasts for an extended period we need to position that activity relative to the point in time. We use had been to indicate that the activity completed at the point in time under consideration.
Ten months ago John had been working as a chef for 3 months.
Ten months ago John had been unemployed for 7 months.
In these cases there is a very strong implication that something changed at the point in time.
Ten months ago John had been unemployed for 7 months. However, he found a position at XXX and has been working full-time since then.
Past Perfect: "When we talk about something that happened in the past we sometimes want to refer back to something that happened before that time."
It's like a double past tense.
Therefore, you might say
"I had been there the previous year."
"Previous" is before the events of a story, which is set in the past.
Considering your example:
I had been there last year.
The problem is "last year" takes it's reference point from the present. It's the previous year in terms of the current year.
However, it ought to be in terms of a past year. In this way, it seems like a mistake.
However, it doesn't mean the sentence "I had been there last year" is completely grammatically impossible.
It is using a jumble of time specifications. For example, one moment the Past Perfect, then switching to the Simple Past or the historical/dramatic/narrative present.
This may be useful in certain contexts.
For example, a whole narrative set in the past:
She lived in Paris. I had been there last year but failed to visit her.
Best Answer
This sentence is wrong because present perfect can not be used for time adverbials like last month.
You can say
I stayed in your hotel for severaldays last month is the preferred form though. past perfect is usualy not used for a single event in the past.
This sentence is correct.
Simple past or past perfect tells about the completed action in the past.
Past continuous or past perfect continuous tells about a continuous activity in the past