Please see the attached file, please do Part A only.
This problem is misleading as it suggests that the method you should follow here is more rigorous than it really is. E.g., a slightly different treatment would not yield the first term in the mean field Hamiltonian. The minimization of the free energy is actually how you compute things in mean field theory, and not by just heuristically constructing some "mean field" Hamiltonian. If you follow the standard mean field theory, then you can simply take the parameters in the mean field Hamiltonian to be unknown constants and perform the minimization procedure for the free energy (this is explained in detail in books on statistical mechanics).
There are a few ways we can justify the form of the given mean field Hamiltonian as follows, but the method suggested in the problem is totally wrong (I'll explain what is wrong about it below). The Hamiltonian is:
H = -J sum over <i,j> of s_i s_j (1)
Here <i,j> is a pair of two nearest neighbors and the summation is over all nearest neighbors. Note that this means that a term s_i s_j for i and j nearest neighbors will only occur once. If you sum over all lattice points i and then for each sum over all the lattice points j that are neighbors of i, you'll sum over all the nearest neighbors twice. You'll encounter the term s_i s_j when summing over the nearest neighbors of i and again when you arrive at lattice point j and sum over all its nearest neighbors. This means that the summation over <i,j> can be correctly carried out, e.g. by summing over all the lattice points and taking only two of the nearest neighbors, e.g. the one to the right and the one above it. The interaction with the ...
A detailed solution is given.