Since there is no other constraint other than length of the parts of the string in the given question , so here we need to be concerned about the minimal length string that can be generated by the given language only.
So L = { w1 x w2 | w , x ∈ {a,b}* , |w1| >= 0 , |w2| > 1 and |x| >= 0 ,
So for minimal length string we can |w1| = 0 , |x| = 0 and |w2| = 2.
Hence length of minimal string = 2
Hence number of states needed in minimal DFA = 2 + 1 = 3