Let $L \subseteq \{a,b \}^* $ be a rational language. $K$ the subset of words in $L$ that does not have has a factor $a^2$ and $b^3$. Show that $K$ is rational.
If $A$ is a DFA that accepts L. I think we can modify it in order to get a new automaton that recognizes $K$. I just don't know how.

You need to check two things for a word to be in $K$: that the word is in $L$, and then that it doesn't contain $a^2$ or $b^3$. (Or you could view the second thing as two separate tasks, so there are 3 things to check).
How can you make an automata that checks all those things, and only accepts if they all hold?
(Or, as @emesupap says in a comment, you can phrase this in terms of closure properties of regular languages. But you can also just describe the DFA.)