Which mathematical property allows us to combine proportional relationships?

Let us say we want to define electrostatic force between two charges. What would it be a function of? We make the simplest guess that it must be related to the charges $q_1,q_2$ and the distance $r$ between the two, $F\left(q_1,q_2,r\right)$. Now to get any functional form we need a controlled experiment where we measure the force by varying any one of the three parameters at a time while keeping the others fixed. In doing these experiments we find the following,

  1. $F\left(q_1,q_2,r\right)\propto q_1q_2\big|_{\text{fixed r}}$
  2. $F\left(q_1,q_2,r\right)\propto \frac{1}{r^2} \big|_{\text{fixed }q_1q_2} $

Due to the fact that these are true only when the other parameters are fixed, we can not directly “combine” the two proportionalities in any meaningful way. To do so, we need to do the following.

Notice that the first proportionality is true for a fixed $r$. Thus in general the constant of proportionality must be some number $\alpha_1$ multiplied by some function of $r$, say $f(r)$. Similarly the second constant of proportionality must be $\alpha_2~g(q_1q_2)$. Now that we have converted our proportionalities into equalities, we can use transitivity to obtain

$$\alpha_1f(r)q_1q_2=F=\frac{\alpha_2g(q_1q_2)}{r^2}\\ \alpha_1f(r)r^2= \frac{\alpha_2g(q_1q_2)}{q_1q_2} $$

Since $\alpha$’s are numbers, the LHS is purely a function of $r$ and the RHS purely a function of $q_1q_2$, the only way the equation will hold true is if both sides equal a constant (can be set to 1 without loss of generality). This can only happen if $f(r)=1/r^2$ and $g(q_1q_2)=q_1q_2$ and $\alpha_1=\alpha_2$. This finally gives us (using either of the proportionalities)

$$F\propto \frac{q_1q_2}{r^2}$$

your description is imprecise ∝1.2 for fixed r and ∝1/^2 for fixed q1,q2 and r independent of q1 and q2 only then you can deduct Coulombs law