Non-canonical backlinks

I’ll describe my problem.

I have site A1, and the URL 1:

I also have another site A2, and the URL 2: This webpage has a canonical URL point to the URL 1: by using link tag:

// source code ""  <link rel="canonical" href="" /> 

Now, suppose the URL 2 is shared many times as backlinks. So which URL will benefit in SEO?