You'd use the balanced chemical equation for the reaction that takes place between borax and hydrochloric acid.
More often than not, borax is actually described as being a decahydrate, #Na_2B_4O_7 * 10H_2O#, its reaction with hydrochloric acid producing boric acid, #H_3BO_3# according to the balanced chemical equation
#Na_2B_4O_7 * 10H_2O_((aq)) + color(red)(2)HCl_((aq)) -> 4H_3BO_(3(aq)) + 2NaCl_((aq)) + 5H_2O_((l))#
Let's say your titration used #"X mL"# of a #"Y-mol/L"# hydrochloric acid solution. Notice that you have a #1:color(red)(2)# mole ratio between the borax decahydrate and hydrochloric acid.
This means that you can use the moles of hydrochloric acid added to determine how many moles of borax were present in solution.
So, since molarity is defined as moles of solute per liter of solution, you can write
#C = n/V => n = C * V#
#n_(HCl) = Y"mol"/cancel("L") * X * 10^(-3)cancel("L") = (XY)/1000"moles HCl"#
The number of moles of borax will be
#(XY)/1000cancel("moles HCl") * "1 mole borax"/(color(red)(2)cancel("moles HCl")) = (XY)/2000"moles borax"#