The final population of the flies is equal to the growth rate minus the number of flies consumed by the spiders. That is,
final population = 6(3^x) - (4x + 1)
Substituting 2 to the x of the equation above,
final population = 6(3²) - (4(2) + 1) = 45
Thus, the final population of the flies would be 45.