You are looking for two identical factors from your expression you provided since squares have the same length and width.
X^2+8x+16 <------ factor the expression
Factor 16 in a way that their factors add up to 8. So that is why I chose 4 and 4.
(x+4)(x+4)
Thus the length and width are both x+4