Alright, so, you have a scale that needs a four ounce weight to even it out. Well, there just happens to be 8 ounces of water right on the table. Problem is, there's no four ounce measuring cup, and you need everything to be exact or else the scale won't be even. Therefore, you must use what's available to measure out exactly four ounces. You have on the table three bottles: an 8-ounce bottle (which is already filled with water), a 5-ounce bottle, and a 3-ounce bottle.
Let's start by filling up the 5-ounce bottle with the water from the 8-ounce bottle, which leaves us with 3 left in the 8-ounce bottle. A point to remember is that you can only fill the bottles to the brim, so whatever doesn't fit in the bottle you were trying to transfer to stays in the original container. Common sense, if you take 5 ounces from 8 ounces of water, you have 3 ounces left. Next, we fill up the 3-ounce bottle with what we just poured into the 5-ounce bottle. That leaves us with 3 ounces in the 3-ounce bottle, 2 ounces in the 5-ounce bottle, and 3 ounces in the 8-ounce bottle.
Let's go ahead now and move the 3 ounces from the 3-ounce bottle into the 8-ounce bottle, which adds up to 6 ounces in the 8-ounce bottle. Then, we move the 2 ounces from the 5-ounce bottle over to the 3-ounce bottle. With me so far? 2 in the 3-ounce, 0 in the 5-ounce, and 6 in the 8-ounce. Now, lets fill up the 5-ounce bottle again with the water from the 8-ounce, leaving us with only 1 ounce left in the 8-ounce bottle. Now, look very carefully. There's 2 ounces still in the 3-ounce bottle, which means it only has space for 1 ounce. 5 ounces minus 1 ounce equals 4 ounces. So, fill the 3-ounce bottle up with the 5-ounce bottle, and voila! You've got 4 ounces.
However, it's not so simple as that! Now that you've got 4 ounces of WATER, what are you going to do about the weight of the glass? Well, the obvious solution is add the same weight to the other side! As it so happens, a little searching in the room will procure you an extra empty 5-ounce bottle. Just add that to the scale as well, and there you have it. One key item and the door remains unlocked.