In a coordinate plane, square \(ABCD\) has vertices at \(A(0, 0)\), \(B(0, 4)\), \(C(4, 4)\), and \(D(4, 0)\). A point \(P\) lies on the line \(y = x + 1\). If the distance from \(P\) to \(A\) is 5 units, find the coordinates of \(P\). Additionally, calculate the perimeter and area of the rectangle formed by the points \(P\), \(A\), \(B\), and \(C\). Let's think step by step and output the final answer within \boxed{}.
user