I misread the question originally.
The maximum printing area is a square, side length x cm. If we add the margins, we have a rectangle length x+12 cm and width or height x+8 cm. So the area of the billboard is (x+12)(x+8)=24 sq m=240000 sq cm. So x^2+20x+96=240000.
x^2+20x+100-100+96=240000; (x+10)^2=240000+100-96=240004. So x+10=sqrt(240004)=489.90 cm approx and x=479.90 cm or 4.8m approx, and the dimensions of the billboard are 4.919m and 4.879m approx.
CHECK: 4.919*4.879=24 m^2.