If fan is placed just behind the sails then acc. t o3rd law boat wont move
but if u dont attach fan just behind the sails and ,keep the fan to the side of the boat.
then the fan will be positioned so that the wind from it would hit the side of the edge of the sail. Due to Bernoulli principle,a vacuum, will be created and a differential pressure will drive the boat forward.