Let [tex]\theta[/tex] be the angle the dog makes with the positive horizontal. (So in the given sketch, we see the dog at an angle of [tex]\theta=\frac\pi4[/tex], for example.)
When [tex]\theta[/tex] ranges from [tex]-\frac\pi2[/tex] to [tex]\pi[/tex], so the angle subtended by the arc traced out by the dog in this range measures [tex]\frac{3\pi}4[/tex], it can cover a total area of 3/4 of a circle with radius 5 m, or [tex]\frac{3\pi}4 (5\,\mathrm m)^2 = \frac{75\pi}4 \,\mathrm m^2[/tex].
When [tex]\theta=-\frac\pi2[/tex] or [tex]\theta=\pi[/tex], the leash is flush against the wall, at which point the remaining free space is the sector of a circle subtended by an angle of 180 - 135 = 45 degrees, or [tex]\frac\pi4[/tex] radians, with radius 4 m. There's one sector like this on either side of the wall, so the remaining area the dog can reach is [tex]2\cdot\frac\pi4(4\,\mathrm m)^2 = 8\pi\,\mathrm m^2[/tex].
Then the total area the dog can cover is
[tex]\dfrac{75\pi}4 + 8\pi = \dfrac{107\pi}4 \,\mathrm m^2[/tex]
so that [tex]a=107[/tex] and [tex]b=4[/tex], and hence [tex]a+b=\boxed{111}[/tex].