[subject] + 刚 + [verb phrase 1] + 就 + [verb phrase 2]
[subject 1] + 刚 + [verb phrase 1],+ [subject 2] + 就 + [verb phrase 2]
刚 + first action, 就 + second action: the second came hard on the heels of the first. 刚 stresses how recent the first action still was – often with a sense that the second came too soon.
Both 刚 and 就 are adverbs, so each goes after its subject and right before its verb.
With a different subject in each half, 就 follows the second subject.
刚才 is a time word, "a moment ago", and doesn't pair with 就 this way.
一…就 says "as soon as" in general and suits habits: 他一喝酒就脸红. 刚…就 is about one occasion, with the weight on how little time had passed.