ができていた

had formed

→ が
phrase Common #7,506
had formed Used after a noun to describe something that had formed or come into existence. Depending on the noun, できていた can also mean that something was ready or complete.
JA: 駅の前に新しい店ができていた。
EN: A new shop had opened in front of the station.

友達におすすめされたラーメン屋に行ってみたら、行列ができていた。

I went to the ramen shop my friend recommended, and there was already a line out the door.

昨日彼女は荷造りを終えたので、今朝早く用意ができていた。

She finished packing yesterday, so she was ready early this morning.

女子トイレに長い列ができていた。

There was a long line for the women's restroom.

そっちもあまり喜んでいなかったけど、読み手は出発の準備ができていた。

You weren’t too happy about it either, but the reader was ready to leave.