The gemara says that if Reuven ate from the land for 3 years, ideally he must have a claim that he purchased it 3 years earlier from Shimon who is being identified as the owner (mara kama). But, if Shimon is not clearly identified as the owner, rather levi is claiming to be the owner, the fact that reuven purchased it from shimon will not help in his claim against levi. Therefore, the gemara says that Reuven must do one of two things:
1. Provide proof that shimon lived there for some time, even one day. This will establish Shimon to some small degree as an owner, so that when reuven claims that he purchased it from shimon it is a chazaka with a claim. The Ketzos (146:9) points out that even if reuven has a contract that he purchased it from shimon, the contract itself is useless unless reuven can establish shimon as an owner through witnesses who was able to sell him the field (which is against the mahari"t who holds that when reuven has a contract, he need not establish shimon as an owner).
2. Reuven must make a claim that he purchased from shimon and that he knows for a fact that shimon purchased it from levi (such as claiming that it was sold in his presence). The gemara seems to understand that reuven is only believed because he has a migu. Meaning, that since he could have claimed he bought the field directly from levi, he is believed to say he bought it from shimon who he knows bought it from levi. I was very troubled why reuven needs a migu at all. The very fact that he claims that he bought it from shimon who he knows bought it from levi should be a perfectly legitimate claim without the need for a migu?
I found that the ketzos (146:12) asks even stronger that this shouldn't even qualify as a migu, because it is a migu l'mafreia? The ketzos explains that in truth no migu is needed. Reuven's claim that he bought it from shimon who he knows bought it from levi is itself a perfect claim. The term "migu" in the gemara means "just like", it is not a "mah li lishaker". The ketzos is medayek from the rashbam on 31a that the gemara doesn't really mean a migu because the claim is itself a fine claim. However, Tosafos 30 holds that reuven is only believed through an actual migu. The Steipler disagrees with the ketzos and holds that without proof that shimon lived there for a day, their is a major rei'usa in the claim of reuven. Therefore, it is only through a migu that reuven can restore his claim to being a valid claim.