HCOOH + H2O <---> HCOO- + H3O+
Ka = 1.8 X 10^-4 = [HCOO-][H3O+] / [HCOOH]
In the solution, [HCOO-] = [H3O+] = x
Quite properly, [HCOOH] = (2.30 X 10^-3 - x).
Since the formic acid solution is pretty dilute, and since Ka is sort of small, we can initially assume that x will be small compared to 2.3 X 10^-3, and so we can ignore it. If we do that, then,
Ka = x^2 / 2.30X10^-3 = 1.80 X 10^-4
x = 6.4 X 10^-4 = [H3O+]
pH = 3.19
Now, quite properly, our assumption that x would be small compared to 2.3 X 10^-3 is incorrect, and we really cannot ignore x in that expression. So, we should go back to the original expression for Ka:
Ka = x^2 / (2.30 X 10^-3 - x) = 1.80 X 10^-4
Quite properly, you should rearrange this into a quadratic form and use the quadratic equation to solve for x. Once you've done that, x = [H3O+], and pH = - log (x).