It is important that we know the dissociation reaction of the compound. For this case it would be:
C6H5COOH = C6H5COO- + H+
Benzoic acid is a weak acid which means it does not completely dissociates into ions. The pH is calculated by the equation:
pH = -0.5 log Ka
2.45 = -0.5 log Ka
Ka = 1.2589x10^-5