こんにちは。質問ありがとうございます。
「お店の人」はthe person at the storeと訳しました。「店員」という意味のclerkやsalesperson、レジで働いている人ならcashierという単語を使ってもいいです。
「これを僕にくれた」は gave me this かgave this to meと言えます。意味は同じです。
「代わりに」はinsteadと言います。
またの質問をお待ちしています。
I went to the store to buy a treat, but they were sold out, so the lady working there let me have this for free.
この場合、次のような言い方ができますよ。
ーI went to the store to buy a treat, but they were sold out, so the lady working there let me have this for free.
「お菓子を買いにお店に行ったら売り切れていて、お店の人がこれをタダでくれた」
to be sold out「売り切れる」
to let me have this for free「これを無料で私に持たせてくれる」=「 サービスでこれをくれる」
ご参考まで!