We use the present perfect tense when we want to connect the present with the (recent) past in some way and this will appear as has had or have had in full forms or as 's had or 've had in ...
Had been working is the past perfect continuous. It's exactly the same as the past perfect, except we use it for longer actions: she had been working all day. Anyway, while I was jumping on the ...