Certain material heating water in a recipient I don't know how to resolve a problem, but I don't want the answer since I'm almost going to have it resolved.
What the problem says is we have 85 liters of water at 7ºC in an iron pot of 29kg. We want the water to be at 86ºC. The temperature of the iron pot is 12ºC. The water is heated by fire wood (65% of the thermal energy is wasted in combustion), and has a heating value of 12 MJ/kg. We need to determine the amount of wood needed to heat the water.
I would apply the normal formula of energy transfer: m1*c1*(t2-t1)=m2*c2*(t2-t1). But since we are using fire wood there, I don't know how to resolve this problem, probably because I'm missing something there... and I don't know what should I do.
Which formula or principle would I need to use when having the material and the heating value of the material used?
 A: If you know the specific heat of water and iron you can work out how much energy is needed to bring the water and the pot to 86°C. You need to work out how many kg of wood you need to burn to produce that amount of energy. The question even tells you how much of the energy produced by burning the wood is wasted and doesn't go towards heating the pot and water.
Whoever set the question is probably looking for the simple answer, but there are lots of extra bits you could have fun with. For example you're told the volume of the water not it's mass, but specific heat is normally quoted per unit mass. That means you need to know the density of water at 7°C to work out it's mass, and the density isn't exactly 1g/cm$^3$. Also the specific heat of both water and iron are functions of temperature.
A: 
Which formula or principle would I need to use when having the material and the heating value of the material used?

I would suggest starting with the conservation of energy.  Have you tried drawing a block diagram showing where the energy (heat) is going from/to within the limits of the setup?
Lastly keep an eye on the first law of thermodynamics...
A: 
I would apply the normal formula of energy transfer: m1*c1*(t2-t1)=m2*c2*(t2-t1).

That's not the "normal formula of energy transfer". That's just the formula used when you mix liquids. A more generalized formula for energy transfer would be "heat lost=heat gained", or the first law of thermodynamics $$\Delta Q=\Delta U+\Delta W$$ Where $\Delta Q$ is heat supplied, $\Delta U$ is change in internal energy, and $\Delta W$ is work done by system.
In the case of your problem, as there is no work being done, just balance the heats. See how much heat goes into the system, and then compare this with the total heat required (sum of all $mc(T_2-T_1)$) to raise the temperature of the system.
