In the diagram, four squares of side length 2 are placed in the corners of a square of side length 6.  Each of the points $W$, $X$, $Y$, and $Z$ is a vertex of one of the small squares.  Square $ABCD$ can be constructed with sides passing through $W$, $X$, $Y$, and $Z$. What is the maximum possible distance from $A$ to $P$? [asy]
path square = scale(2) * unitsquare;

draw(square); draw(shift(4) * square); draw(shift(4, 4) * square); draw(shift(0, 4) * square);
draw((2, 0)--(4, 0)); draw((0, 2)--(0, 4)); draw((6, 2)--(6, 4)); draw((2, 6)--(4, 6));

pair a = shift(3, 4) * dir(135);
pair b = shift(4, 3) * dir(45);
pair c = shift(3, 2) * dir(-45);
pair d = shift(2, 3) * dir(-135);
draw(a--b--c--d--cycle);

label("$2$", (1, 6), N); label("$2$", (3, 6), N); label("$2$", (5, 6), N);

label("$2$", (6, 5), E); label("$2$", (6, 3), E); label("$2$", (6, 1), E);

label("$W$", (2, 4), NW); label("$X$", (4, 4), NE); label("$Y$", (4, 2), SE); label("$Z$", (2, 2), SW);
label("$A$", a, N); label("$B$", b, E); label("$C$", c, S); label("$D$", d, W); label("$P$", (6, 0), SE);
[/asy]
Since $\angle WAX = 90^\circ$ regardless of the position of square $ABCD$, then $A$ always lies on the semi-circle with diameter $WX$.

The center of this semi-circle is the midpoint, $M$, of $WX$.

To get from $P$ to $M$, we must go up 4 units and to the left 3 units (since $WX=2$), so $PM^2=3^2+4^2=25$ or $PM=5$.

Since the semi-circle with diameter $WX$ has diameter 2, it has radius 1, so $AM=1$.

So we have $AM=1$ and $MP=5$.

[asy]
path square = scale(2) * unitsquare;

//draw(square); draw(shift(4) * square); draw(shift(4, 4) * square); draw(shift(0, 4) * square);
//draw((2, 0)--(4, 0)); draw((0, 2)--(0, 4)); draw((6, 2)--(6, 4)); draw((2, 6)--(4, 6));

pair a = shift(3, 4) * dir(135);
pair b = shift(4, 3) * dir(45);
pair c = shift(3, 2) * dir(-45);
pair d = shift(2, 3) * dir(-135);
//draw(a--b--c--d--cycle);

//label("$2$", (1, 6), N); label("$2$", (3, 6), N); label("$2$", (5, 6), N);

//label("$2$", (6, 5), E); label("$2$", (6, 3), E); label("$2$", (6, 1), E);

label("$W$", (2, 4), NW); label("$X$", (4, 4), NE); //label("$Y$", (4, 2), SE); label("$Z$", (2, 2), SW);
//label("$A$", a, N); label("$B$", b, E); label("$C$", c, S); label("$D$", d, W);
label("$M$", (3, 4), SW); label("$P$", (6, 0), SE); label("$A$", shift(3, 4) * dir(75), N + NE);
draw((6, 0)--(3, 4)--(shift(3, 4) * dir(75))); draw((6, 0)--(shift(3, 4) * dir(75)), dashed);
draw((2, 4){up}..{right}(3, 5){right}..{down}(4, 4), dashed);
[/asy]

Therefore, the maximum possible length of $AP$ is $5+1=\boxed{6}$, when $A$, $M$, and $P$ lie on a straight line.