One of the methods of obtaining energy from renewable sources is the technology of indirect cofiring of biomass. It consists in the gasification of secondary fuel and combustion of the generated gas in the boiler together with its primary fuel. The paper presents a thermodynamic analysis of the use of the boiler flue gases as the converting medium in the process of indirect co-firing - a technology which is being developed at the Institute of Power Engineering and Turbomachinery of the Silesian University of Technology. The basis of the analysis are the data resulting from variant calculations conducted with the use of the Gaseq program. The calculations were made for various compositions of gasified fuel and the converting medium, variable fuel/oxidiser ratios and variable gasification temperatures. As a result, the equilibrium composition and the calorific value of the generated gas were obtained. The main optimisation objective adopted here was the nondimensional efficiency coefficient, which is the ratio of the chemical energy of products to the chemical energy of the process reactants.