check the picture below.
now, the sides at the bottom, the straight sides, are plain to see how long each is, you can pretty much count the units off the grid.
so, the only ones you need the distance formula or pythagorean theorem is the slanted ones, there are two, and both are equal, so, just get the length of one, and double it up.
[tex]\bf \textit{distance between 2 points}\\ \quad \\
\begin{array}{lllll}
&x_1&y_1&x_2&y_2\\
% (a,b)
&({{ 2}}\quad ,&{{ 7}})\quad
% (c,d)
&({{ 6}}\quad ,&{{ 4}})
\end{array}\qquad
% distance value
d = \sqrt{({{ x_2}}-{{ x_1}})^2 + ({{ y_2}}-{{ y_1}})^2}
\\\\\\
d=\sqrt{(6-2)^2+(4-7)^2}\implies d=\sqrt{4^2+(-3)^2}\implies d=\sqrt{16+9}
\\\\\\
d=\sqrt{25}\implies d=5[/tex]
double that up, and both slanted sides are 10, the perimeter is all sides summed up.