Assuming the factory is working at the same production rate, the number of days is proportional to the number of boats.
... 8 days/(12 boats) = x days/(30 boats)
Multiply by 30 boats, and you get
... x days = 8 days×30/12 = 20 days
It will take the factory 20 days to produce 30 boats.