How are が and は used here?


I am a fluent speaker (not a learner) but I can't explain why が and は are used
in these lines when asked by a friend.

> そんな私を拾ってくれたのがその時言い合いとなったお客様シェフなんです (from this
> [video](https://youtu.be/TzEsAIDkLXI))

> それを身を挺して助けてくれたのが誠司さん ([video](https://youtu.be/dRMbXiTOB_E))

I feel like は seems more common in similar contexts: そこで現れたの **は** この子です

> どうすれば記憶は戻るんだ ([vidoe](https://youtu.be/i6mbGfZ_t3o))

With this one I think it's more common to say どうすれば記憶が戻るんだ. I can't explain
why は is used here. Google shows どうすれば記憶は 15, どうすれば記憶が 3,740 proving that my
intuition is right.




As you know, のは is the most common pattern to form a [cleft
sentence](https://japanese.stackexchange.com/a/19208/5010), but this は can be
replaced with も, が, すら, まで, etc.

When が is used, it emphasizes the sentence with its exhaustive-listing
function. In English, the difference would be:

  * 助けてくれたの **は** 誠司さんでした。  
It was Seiji who helped me.

  * 助けてくれたの **が** 誠司さんでした。  
It was (none other than) _Seiji_ who helped me.

Note that this が is pronounced with emphasis in the video, which is usually a
sign that が has the exhaustive-listing function.

* * *

As for どうすれば記憶は戻るんだ vs どうすれば記憶が戻るんだ, both are fine. I vaguely feel は has a
faint "generalizing" function, as if saying "in a case like this", because は
is for describing a known fact. But the difference is extremely small.

