$L$ is a language over {$a,b$}. $K$ is also a language: $K =$ {$w:wa \in L$}. Show that if $L$ is regular, then $K$ is regular as well.
I'm having a hard time finding a way to show that if $L$ is regular, then so is $K$ here.
I found that with $L$ with a regular expression of $(ba)*$ and $K$ with $(ba)*b$ would work.
A word $w$ from $K$ would be $bababab$.
If $w$ = $bababab$, and you add $a$, then it becomes $babababa$, which is indeed a word that respects the regular expression of $L$. So $w$ is a word of $K$.
Because I was able to represent both language with a regular expression, then I have proven that they are both regular. Is this all needed to prove that they are both regular? Or am I missing something to finalize the proof?
Note that the question is asking you to show that this is the case for all regular languages $L$; for any such language, then the language $L_-$ such that $L_-=\{w: wa\in L\}$ is regular.
Fortunately, there are at least a couple of straightforward ways of proving this. For instance, one of the definitions of a regular language is that it's the language accepted by a DFA. You could show that given a DFA accepting a given language $L$, you can construct a DFA accepting $L_-$. (Hint: you can use exactly the same set of nodes and pathways, and just change the set of accepting nodes.)
Alternately, you can show it 'by induction' on the definition of a regular language. That it's true for a finite set of strings should be obvious; then you just need to show that if you can construct regular expressions for $L_-$ and $M_-$ that you can construct one for $(L\cup M)_-$, $(L\cdot M)_-$, and $(L^*)_-$. For instance, if $\varepsilon\not\in M$ then a regular expression for $(L\cdot M)_-$ is $L\cdot (M_-)$ (but be careful about the case where $M_-$ is empty!), whereas if $\varepsilon\in M$ then it's $(L\cdot (M_-))\cup L_-$ — can you see why this works?