Effect of magnetic frustrations on magnetism of the Fe3BO5 and Co3BO5 ludwigites