There seem to be two sorts of situations (I'm assuming you don't start off with the side lengths) in which you would need to figure this out:
1) Measure the side lengths directly, and then divide one by the other
2) Use the known perimeter and area to find the ratio.
The first option is pretty self explanatory. We'll just leave that alone.
The second option is a bit more complicated, and we'll need to look at some equations to start us off. Let's define our ratio, `R`:
`R = s_1/s_2`
Now, just to be complete, let's just state that `s_1` and `s_2` are adjacent sides. Also, notice that `R^-1` or `s_2/s_1` is going to be the a ratio for the same rectangle, just with the sides switched.
Alright, we can move on.
We know that our perimeter (`P`) and area (`A`) will follow the following formulas:
`P = 2s_1 + 2s_2`
`A = s_1s_2`
Remember, we stipulated that we already know the perimeter and area. Also, recall our equation for the ratio an allow us to substitute for one of the sides:
`s_1 = Rs_2`
Now, we can actually solve for all 3 variables: `s_1`, `s_2`, and `R`. However, I'll just show the solution for `R` because that's what the question asks for.
Let's substitute our above relation into our perimeter and area equations:
`P = 2Rs_2 + 2s_2`
`A = Rs_2s_2`
Let's simplify both equations:
`P = (2R+2)s_2`
`A = Rs_2^2`
Now, we can simplify the perimeter formula to give us a way to subsitute `R` for `s_2`:
`P/(2R+2) = s_2`
Now, we can substitute this in for our area formula:
`A = RP^2/(2R+2)^2`
We start to solve for R by first multiplying both sides by `(2R+2)^2`:
`A(2R+2)^2 = RP^2`
Let's figure out what that square is using FOIL:
`A(4R^2 + 8R + 4) = RP^2`
Now, we distribute the `A` term:
`4AR^2 + 8AR + 4A = RP^2`
Now, we subtract RP^2 to get a quadratic equation:
`4AR^2 + (8A-P^2)R + 4A = 0`
Well, I don't think I'll be able to factor this too easily, so let's go ahead and use the quadratic equation:
`R = (-8A + P^2 +- sqrt((8A-P^2)^2 - 4(4A)(4A)))/(2(4A))`
`R = (-8A+P^2 +-sqrt(P^4 -16AP^2 + 64A^2 - 64A^2))/(8A)`
`R = (-8A+P^2+-srqt(P^4-16AP^2))/(8A)`
Let's factor out a P^2 in the square root and distribute the division by `8A` :
`R = -1 + P^2/(8A) +- P/(8A)sqrt(P^2-16A)`
Well, this is ugly, but looking at the units for perimeter and area, it actually lines up with what the unitless ratio. However, let's put some situations in there and check.
Suppose we have a square with side lengths 1. Our ratio would certainly be 1. Our area would be 1 unit^2, and our perimeter would be 4 units. Let's see if `R` becomes 1 if we put this info into our formula:
`R = -1 + 16/(8*1) +- 4/(8*1)sqrt(16-16(1))`
`R = -1 + 2 +- 4/8(0) = 1`
Well, that ratio lined up. You can try this formula for other rectangles, I suspect the result you get by addition vs. subtraction gives you `R` and `R^-1`, but I haven't checked whether or not that is true. But hey! I'll leave that as an exercise for you!
I hope that helps!