The present application generally relates to a system to prepare a fuel from a biomass and a petroleum fraction wherein a renewable fuel oil is obtained via pyrolysis, delivered to the injection point of a refinery system, and then co-processed with a petroleum fraction in the presence of a catalyst.