You should not try to self diagnose an eye prescription.
That being said, I'm going to partly disagree with the previous answer based on some technicalities. First, the process you describe is actually close to what real eye doctors use. They use a
phoropter (machine with all the lenses) to test one prescription then test another. They keep going until they find a point where one is too strong, and the other too blurry. Then they narrow the increments and check in between. This is an iterative process to get down to the exact prescription - so you definitely need more than 2 data points unless you happen to start with the right 2 points.
Now, phoropter's typically measure in 0.25 diopter increments - so glasses prescriptions would be better represented by a finite subset of natural numbers than the real numbers - they go up and down in finitely sized increments, and there are a finite number of them.
So, if your two test prescriptions happen to be only 2 increments apart, and you are sure that one is too strong and one is too week, then yes, if you average the two you should get the correct prescription.
Note: There are some additional considerations, such as astigmatism, that may need to be accounted for - so you can't even use two pairs of glasses that are close to what you need IF they don't have the correct astigmatism factor or eye spacing. So again, you should always get a proper prescription from an eye-doctor.
By analogy consider US shoe sizes - if I give you a size 9 and it's slightly to small, and then I give you a size 10, and it's slightly to big, then you could gnerally conclude you are a size 9.5 (the average of the two) because shoe sizes go in .5 increments. There is no 9.3, or 9.8, etc. to worry about. However, that wouldn't work if you had abnormally wide feet (such as 9.5EE), or if I gave you too test pairs such as 7 and 10, because you could be anywhere between the two - not necessarily exactly the average.