The pictorial representation of the problem is shown below
Let PQR be the height of the ceiling which is 4 feet from the wall. From the diagram PQ=12ft.
We have to find the height QR.
Since the width is 20ft, take A,A′ as vertices with A as (10,0) and A′ as (−10,0).
Take the midpoint of AA′ as the centre which is C(0,0)
AA′=2a=20⇒a=10 and b=18−12=6
∴x2100+y236=1
Let QR be y1 then R is (6,y1).
Since R lies on the ellipse,
36100+y2136=1⇒y1=4.8
∴PQ+QR=12+4.8
Hence the required height of the ceiling is 16.8feet