Finding side lengths of squares given an area and a perimeter