A 20.0mL 0.3M HCl solution is titrated with 0.4M NaOH. What is the exact pH of the solution before titration? And what is the pH at the equivalence point?(are there any straightforward formulas to use on this kind of problem?)

There is a system and sets of formulas depending upon the problem.

0.3M HCl. HCl is a strong acid, meaning it ionizes 100%, which means H^+ = 0.3 and Cl^- is 0.1M
So pH = -log(H^+). Plug in H^+ and solve.

For the equivalence point, you must recognize what you have at the equivalence point.
HCl + NaOH ==> NaCl + H2O
When a strong acid and strong base react in the exact proportions, you get a pH = 7 at the equivalence point. NaCl is the salt of a strong base and a strong acid, neither the Na^+ nor the Cl^- is hydrolyzed which makes the pH just that of pure H2O.