Draw yourself a picture
the dog will have a full semicircle on the long side of the building radius 12 m area = 1/2 pi 122
when pooper gets to the edge of either end of the building rope will be 3m shorter
it will have two quarter circles radius 9 m 1/2 pi 92
then when slobber-dog gets to the back edge of the building rope will be 3 + 4 m shorter
two quarter circles radius 5 1/2 pi 52
Add together