The chemical reaction would most likely be written as follows:
A + B = AB
We cannot simply use the usual method of converting grams to moles since we do not have any idea on what are the identities of A and B. The only method we could use is to use the law of conservation of mass where mass inflow in a process should be equal to the mass out in the process. The total inflow of mass would be the mass of A and B and the outflow would be the product AB.
mass of A + mass of B = mass of AB
10.0 g A + 10.0 g B = mass of AB
mass of AB = 20.0 g