Answer:
12 days.
Explanation:

Let x be the time taken by machine Y to produce w widget,
So, the efficiency of machine Y =
,
Since, X takes 2 days longer to produce w widgets than Machine Y,
So, the efficiency of machine X =
,
If total work =
,
Then the time taken by machines X and Y when they work together




According to the question,








Number of days can not be negative,
Hence, the time taken by machine X to produce w widgets = x + 2 = 4 + 2 = 6 days,
Therefore the time taken by machine X to produced 2w widgets would be 12 days.