You can create a patch and attempt to apply the patch. If you experience issues with conflicts such as
error: patch failed: <file_name>:1
error: <file_name>: patch does not apply
the merge will require manual intervention.
Here's an example:
$ git format-patch -n <sha_from_commit_you_want_to_merge> > patch_file.patch
$ git apply patch_file.patch
It is possible this strategy will still be problematic because of the nature of commit A. You cannot separate constituent components of a merge commit without access to the branch from whence the individual commits were made. Your branch/repo just sees that as one commit.
Of course if you do have access to the original branch you can just create a patch file from there, even if they are in different repositories.