Here $A=\left\{x\text{}is\text{}a\text{}natural\text{}number{\textstyle \phantom{\rule{1em}{0ex}}}\text{and}{\textstyle \phantom{\rule{1em}{0ex}}}factor\text{}of\text{}18\right\}$.

$=\{1,2,3,6,9,18\}A=\left\{x\text{}is\text{}a\text{}natural\text{}number{\textstyle \phantom{\rule{1em}{0ex}}}\text{and}{\textstyle \phantom{\rule{1em}{0ex}}}factor\text{}of\text{}18\right\}$

$=\{1,2,3,6,9,18\}{\textstyle \phantom{\rule{1em}{0ex}}}\text{and}{\textstyle \phantom{\rule{1em}{0ex}}}B=\left\{x\text{}is\text{}a\text{}natural\text{}number{\textstyle \phantom{\rule{1em}{0ex}}}\text{and}{\textstyle \phantom{\rule{1em}{0ex}}}\text{}less\text{}than\text{}6\right\}$

$=\{1,2,3,4,5\}.B=\left\{x\text{}is\text{}a\text{}natural\text{}number{\textstyle \phantom{\rule{1em}{0ex}}}\text{and}{\textstyle \phantom{\rule{1em}{0ex}}}\text{}less\text{}than\text{}6\right\}=\{1,2,3,4,5\}$

Therefore,

$A\cup B\text{}andA\cap B=\{1,2,3,4,5,6,9,18\}=\{1,2,3\}.$

$A\cup B=\{1,2,3,4,5,6,9,18\}$

and

$A\cap B=\{1,2,3\}.$