I was a bit confused when I saw this equation for the average price of output produced: an economy produces 1,000 units of output. The money supply (number of notes and coins) is $10,000. This means the average price of output produced will be $10 (10,000/1,000)

Where does that figure come from? And how is it accurate? Does the average of all the prices of goods and services in the economy always have to add up to the money supply? In the scenario above, would it be possible for the average to be anything other than $10?

I need some help understanding this with this scenario:

Let's suppose that currency is replaced with apples. There are 10 people on an island, each having apples in amounts ranging from 1-20. Then there's an 11th person with an orange. Oranges are rare in this scenario. Are things priced based on the money supply, what people can afford, or how rare something is? If it's based on money supply, then it would not be able to be bought, because according to the equation above (money supply/output) the orange would be worth all the apples (the orange being the output). No one is going to be able to get the orange because no one can convince everyone else to give them all the apples. If it's what people can afford, then would it go to the highest bidder? What would happen if everyone had the same amount of apples? If it's a rarity issue that determines value, then would that one orange still be worth a lot if it was rotten and decayed? Furthermore, if it's a demand issue and no one wanted oranges, then would the orange not be included in the GDP since no one bought it? Then is someone was competing with the person with the orange and started selling oranges themselves in exchange for apples, how would it be made sure their prices total to the money supply?

Just how are prices managed to make sure that they collectively equal the money supply?

Is it supply or how much people have of the supply that matters? One example I heard, which is where I got the island example, is that if there were 10 oranges and 10 apples, they would be equal in value, but then if an apple tree was found and 20 more apples got added to the apple supply, then oranges would be worth more apples. But doesn't it also matter how the supply is distributed? For instance, 10 oranges can go up in value but if there's only 20 apples and 20 people each have 1 of those values, how would they be able to exchange?