At about 2 seconds in (just an example; you can of course experiment with different durations and different position and rotation settings), set
X Position of Clip A to -30,
Rotation of Clip B to 10º
X Position of Clip B to 30
Rotation of Clip B to -10º
This already should give you more or less what you wanted.
For a finishing touch or two:
• Make the two clips into a compound clip (select them both and press Option-G).
• Add a copy of the clip before the compound
• Add a cross dissolve between the two.
Note: when adding the cross dissolve, you will get a warning that there is not enough extra media. Click "Create Transition". This is why I suggested you place the first keyframe about 1 second into the clips and not right at the start.
Further bonus: After creating this you may find that the timing of the keyframes is not exactly right.
Enter another feature of FCP: the Video Animation pane.
Double click to open the compound clip, and then press Control-V to open the Video Animation pane. Drag the diamonds to adjust the timing of these keyframes (you can also add new ones there, or deleting existing ones).
Press Control-V again to close. Press the < at the top of the timeline to return to the project.