If it is just a line, then you add them together.
a________________b ________c = 15
If it is a right triangle and we assume ab and bc are legs then you use the pythagorean theorem
ab^2 + bc^2 = ac^2
10^2 + 5^2 = ac^2
100 + 25 = ac^2
sqrt(125) = ac
ab=10 means that aXb is 10, similarly aXc is 5. If your answers can only be whole numbers then--- if aXc =5, then a and c can only be 5 or 1 since that is the only factorization of 5---- if a =1, then b =10 and c=5. If a=5, then b=2 and c =1. If fractions can be included and negative numbers can be included, there are other possibilities. But in either case, ac is 5.