Square and Circle

Given an arbitrary point P on a line segment AB, let AP form the perimeter of a square and PB form the circumference of a circle. Find P such that the area of the square and circle are equal. Possibly from The Stanford Mathematics Problem Book, shared by Dan Meyer at http://blog.mrmeyer.com/2014/confab-circle-square/