Let us suppose that you have $n$ data points $(A_i,B_i,I_i)$ ($i=1,\cdots,n)$ and you want to find the "best" $x$ and $y$ for matching the model $$I=x A+y B$$ the genral method, as already answered by G-Cam, is ordinary least square which consist in the minimization of $$F=\sum_{i=1}^n \big(x A_i+y B_i-I_i\big)^2$$ Computing the derivatives and setting them equal to $0$ since we look for the minimum, we get $$F'_x=2\sum_{i=1}^n \big (x A_i+y B_i-I_i\big)A_i=0$$ $$F'_y=2\sum_{i=1}^n \big (x A_i+y B_i-I_i\big)B_i=0$$ Expanding the above equations, we then have $$x \sum_{i=1}^n A_i^2+y\sum_{i=1}^n A_iB_i=\sum_{i=1}^n A_iI_i$$ $$x \sum_{i=1}^n A_iB_i+y\sum_{i=1}^n B_i^2=\sum_{i=1}^n B_iI_i$$ So, two linear equations in $(x,y)$ easy to solve.
For sure, as G-Cam mentionned, you could prefer the matrix formulation.