It´s making R1 think that incoming and outcoming traffic from link A is taking an extra hop, therefor making the as-path longer for R2, reference to this links "We will now use a technique called AS path prepending, which consists of adding extra “fake” hops to a path using our ASN multiple times."
https://nsrc.org/workshops/2018/ubuntunet-nren-bgp/networking/nren/en/labs/bgp-policy-as-prepend.html#:~:text=We%20will%20now%20use%20a%20technique%20called%20AS%20path%20prepending%2C%20which%20consists%20of%20adding%20extra%20%E2%80%9Cfake%E2%80%9D%20hops%20to%20a%20path%20using%20our%20ASN%20multiple%20times.
and https://www.ccexpert.us/routing-switching/step-4-shortest-aspath.html#:~:text=The%20concept%20and,not%20be%20intended.
You can check a configuration example here https://community.cisco.com/t5/networking-blogs/bgp-as-path-prepending-configuration/ba-p/3819334