How to understand the principles of the rule of three? By the way, who invented it?

I'm looking to learn all the basic math now, because now I'm an adult math looks much more interesting and easier than ever!

As I saw no exact answer for my doubt here on Math SE I resolved to ask this question, which is about the rule of three.

For example, a teacher gave me this problem for me and I quickly resolved it using the rule of three: "3 Castaways had food enough for 12 days. One (crazy) of them jumped in attempt to reach firm ground by swimming. Without one of them, how long the food will last? (something like this, I got the problem in portuguese, so I translated it my way)"

Ok. So what I made is:

3 castaways = 12 days

2 castaways = X

SO:

X = (12 * 3) / 2

or

X = 18

Now, what I wanna know is whether someone can give me a better explanation on why multiplying the number of days (12) by total number of castaways (3), then dividing it by the current number of castaways (2), will result the amount of days the food will last, in the end.

I mean, maybe I'm not knowing how to express myself more clearly, but that's it, I would like to understand the process in a more in depth manner, since this is the only way I can remember math for a long time, because currently I'm like: Ok, I can solve all these problems using the rule of three, but what exactly is going on behind the scenes? What makes this process function?

I learnt in elementary school how to solve this kind of problems. We didn't even know about algebra notation, so we had to resolve it by pure reasoning. Here are the three steps:

If there is food for $3$ castaways for $12$ days, for a single castaway, there is food for $36$ days. Hence for $2$ castaways, there is food for twice less days, i.e. for $18$ days.

A variant of this problem:

If $3$ man hammer a nail in $5$ s, $150$ men will hammer the same nail in $1/10$ s :o)

Through simple experimentation, you will find that the length of time the food will last is inversely proportional to the number of people (the more people you have, the less time the food will last you).

We can model the situation in the following manner:

$$F = t\cdot p\cdot r$$

where $F$ is the amount of food, $p$ is the number of people, $r$ is some constant relating how much food each person eats over a period of time (specifically measured in food/person*time), and $t$ is the amount of time the food will last them.

You are told then that with $3$ people you have $F = 12\cdot 3\cdot r~~~(\diamondsuit)$

You are then asked to solve for $t$ in the following equation:

$$F = t\cdot 2\cdot r~~~~~(\heartsuit)$$

We may assume that $F$ and $r$ remain the same as before (that the one who tried to swim for it didn't take any food with him and that the remaining castaways don't decide to eat more rapidly than they would have otherwise).

Transforming the equations a bit, getting $F\cdot \frac{1}{r}$ isolated in each equation, we get that $F\cdot \frac{1}{r} = 12\cdot 3 = 36$ from $(\diamondsuit)$ and we get that $F\cdot \frac{1}{r} = t\cdot 2$ from $(\heartsuit)$. Since both equations equal $F\cdot \frac{1}{r}$ we can set them equal to oneanother.

Thus, $36 = t\cdot 2$. Dividing each side by two gives us $t=18$.

As for who first used methods like this, arguably this type of question could have been known to and solved by ancient Greeks and Chinese some time in the B.C.'s. They did a lot of work with ratios and the like and were well familiar with the relationship between variables that were proportional or inversely proportional to one another. The necessity of the problem in military logistics would also imply that it would have been known for quite some time.

Every day 3 people deplete 1/12 of the food. Since three people together deplete 1/12 of the food, 1 person depletes a third of 1/12. So 1/(12x3). So two people deplete twice this so they deplete (1x2)/(12x3) of the food source per day. Now you hAve to take the reciprocal. If people deplete 1/3 of the food per day it will last 3 Day. If they deplete 1/5 of the food source per day, it will last them 5 days. We obtain (12x3)/(2). All that reasoning can be shortened by just using the rule of three.