A unit vector perpendicular to ABCD is . The midpoint of AB is . The point F is at a distance from P along this vector. Therefore F is the point .Notice the plus/minus signs.They are there because F could be on either side of the plane ABCD. But we are told that the origin lies inside the prism. Therefore F and the origin must lie in the same half-space or . The origin clearly lies in the first of these, hence so does F, which means that we must take the minus signs. Thus .

That should account for the change of sign from –9 to 9 in the final result.