Review the גמרא דף יא עמוד ב from after the Mishna until the two dots.
Questions:
What is the inference from the mishna that implies Beis Shammai requires four walls to create a Reshus Hayachid?
Learn ריטב”א דף יא: “לימא קסברי
Learn beginning of רשב”א דף יא: “לימא קסברי
The Gemara seemingly concludes that according to Beis Shammai three walls are required to create a Reshus Hayachid.
And according to Beis Hillel only two walls are needed.
Is this indeed the Halacha that only two walls are needed to create a Reshus Hayachid?
Learn ריטב”א דף יא: “הדר אמרינן
Learn the rest of רשב”א דף יא: “לימא קסברי to explain the conclusion of the Gemara.
Note the גירסא change of the הגהות הגר”א (side of the Gemara)
What changes in conclusion of the gemara according to the גירסא change of the גר”א
Learn רמב”ם ה’ שבת פרק י”ד הלכה א
https://hebrewbooks.org/pdfpager.aspx?req=14278&st=&pgnum=57
https://hebrewbooks.org/pdfpager.aspx?req=14278&st=&pgnum=58
and פרק י”ז הלכה ט
https://hebrewbooks.org/pdfpager.aspx?req=14278&st=&pgnum=73
How many walls does the Rambam rule is required to create a Reshus Hayachid? (See מגיד משנה)
How could the Rambam seemingly rule contrary to the Gemara?