The gemara ultimately proves that meshicha is a kinyan that works for a goy from the case where a goy steals from a Jew and primarily the seifa of the braisa where a second goy steals from the first. The fact that the that goy #2 can be chayev misah for stealing from goy #1 implies that goy #1 who stole from the Jew actually acquired the item with meshicha. Tosafos explains that although the entire discussion of meshicha being effective only applies to a sale, but for a gift or any transaction that doesn't involve money all agree that meshicha works (as it does by a jew since there is nothing else). Nevertheless, we can prove the point from the case of theft even though there is nothing else but the meshicha on the item. Why? Because by theft it is coming to his hand illegally - if meshicha wouldn't be a standard kinyan even for a sale, it wouldn't work when it came into his hand illegally, and would only work by a gift where there is nothing else to make the kinyan AND it comes into his hand legally. It seems logical that Tosafos equates theft with a sale (rather than equating it to a gift) because in the context of a sale the item is also being acquired without consent of the owner (since he hasn't yet received payment). The taking of an item prior to payment in a sale is tantamount to stealing an item in the sense that the original owner still maintains a claim, to the exclusion of a gift where the original owner has no claim after the item is given. Therefore, if meshicha works by theft where the owner still has a claim, it should work by a sale where the owner still has a claim.
The gemara tries to prove from the reisha that a goy is chayev misah for stealing from a jew that it must be meshicha works, otherwise why would he be chayev misah. The gemara pushes that off by saying, perhaps meshicha doesn't work and the chiyuv misah is for aggravating the jew. To that the gemara asks, "if so, what does it mean 'it need not be returned", to which the gemara answers, "it is not b'torah hishavon". Rashi here indicates that according to the original thinking that meshicha works as an acquisition, the statement of לא ניתן להשבון, is an independent statement that the Jew is mochel on less than a peruta therefore it doesn't need to be returned. This is to the exclusion of stealing a full peruta that would need to be returned because the Jew isn't mochel. However, Rashi in yevamos 47b explains that even according to the approach that a goy acquires with meshicha, the statement of לא ניתן להשבון is to explain why the goy is chayev misah. If the goy would be obligated to return, that would be in place of capital punishment, thereby exempting him from capital punishment. But, since the goy is not obligated to return, he is chayev misah. This would apply equally to when he steals a peruta or less than a peruta, to the exclusion of a Jew who is obligated to return and therefore not punished. According to this approach, after the gemara says that meshicha doesn't work and the goy is punished for paining the Jew, the question of "what does לא ניתן להשבון mean?" is that since he is not being punished for stealing, but for paining the Jew, this can't be fixed by returning the money. So, why does the braisa imply that he doesn't need to return the money and that is why he is being killed -the capital punishment is for the pain he caused the Jew which is not at all connected to returning the money? To that the gemara answers that it is not b'torash hi'shavon, meaning that the crime committed was paining the Jew which is not possible to return, therefore he is chayev misha.