Can I burn the farmers too?
Python 3, 672 bytes



e=enumerate;H='H';F='F'
def f(m):
&#9;q=m[0];h=len(m);w=len(q);o=0;g=lambda m,c:{(k,l)for i,r in e(m)for j,v in e(r)for k in range(i-1,i+2)for l in range(j-1,j+2)if v==c and k&gt;=0and k&lt;h and l&gt;=0and l&lt;w};n=lambda m,c,d:[[c if(k,l)in g(m,c)-g(m,d)else m[k][l]for(l,v)in e(r)]for(k,r)in e(m)];s=lambda m:H in[q]+[m[h-1]]+[r[0]for r in m]+[r[w-1]for r in m];l=lambda m:all(H not in r for r in m)
&#9;while 1:
&#9;&#9;a=m
&#9;&#9;while not(s(a)or l(a)):a=n(n(a,H,F),F,1)
&#9;&#9;if l(a):return o
&#9;&#9;else:o+=1;z(m,a,h,w)
def z(m,a,h,w):
&#9;for i in(0,h-1):
&#9;&#9;for j,v in e(a[i]):
&#9;&#9;&#9;if v==H:m[i][j+(h-1)//2]=F;return
&#9;for j in(0,w-1):
&#9;&#9;for i,v in e(r[j] for r in a):
&#9;&#9;&#9;if v==H:m[i+(w-1)//2][j]='F';return


Try it online!

It's very long (I've done my best to golf it), and the solution is not optimal. Here is the general idea:


First, let's see if the farmer burns in the original situation. The matrix a is filled with Fs when the fire grows and with Hs if the farmer can reach a position (a=n(n(a,H,F),F,1)).
If the farmer escapes (s(a)), look a the border of a. There must be at least a H. It takes (h-1)/2 ticks to reach the top or the bottom, and (w-1)/2 ticks to reach the left or right border. As soon as we find a H on the top, we put a fire at (h-1)/2 cases on its left. In (h-1)/2 ticks, an F will be there and it may also "burn" other Hs. The same applies for the left and right borders.


The solution is not optimal because:


there are some edge cases, in particular when a fire will burn two borders of the field.
considering top and bottom borders before right and left borders is not necessarily the best solution
going from left to right and top to bottom to find a H is not necessarily the best solution.