Finding the dimensions of a rectangle given its perimeter and a relationship between sides