Marked part has no real error in it.
It simply represents mass as function of area, because thickness and density don't change with location.
For "more acceptable" explanation see "An Infinite Wall" here:
http://www.mathpages.com/home/kmath530/kmath530.htmYou will find that attraction force (weight) is:
and we already know that acceleration is:
g = F / m
Note that on infinite plane with finite gravity F and g don't change with altitude.
On Earth in reality they change not only with altitude, but with latitude as well.
.