For the second problem, start with a right regular grammar for $L$. For each non-terminal symbol $X$ of $L$ add two new non-terminal symbols, $X'$ and $X''$. For each production of the form $X\to\alpha Y$ add the productions $X\to\alpha Y'$, $Y'\to aY'$, $Y'\to aY''$, and $X''\to\alpha Y''$. For each production of the form $X\to\alpha$ add the production $X''\to\alpha$. (Here $\alpha\in\{a,b\}$.) The idea is that the grammar starts out using the original non-terminals to generate the $x$ part of $xa^*y$, switches to one of the single-prime non-terminals to generate the $a^*$ part, and then generates the $y$ part using the double-prime non-terminals. It’s set up so that once it uses a primed variable, it can’t generate any of the original non-terminals, so it can generate an extra string of $a$’s only once.
You can use a similar idea for the first problem, though the details are a bit messier, and it’s easier to work with automata. Start with a DFA $M$ that accepts $L$; we’ll build an NFA $N$ that accepts the modified language. Start with two disjoint copies of $M$, say $M_1$ and $M_2$. The initial state of $N$ will be the initial state of $M_1$, and the acceptor states of $N$ will be the acceptor states of $M_2$. $M_1$ and $M_2$ will keep their original transitions. Finally, for every $a$-transition from a state $q_1$ to a state $q_2$ in $M_1$ we need an $\epsilon$-transition from $q_1$ in $M_1$ to the copy of $q_2$ in $M_2$. The idea is that we start in $M_1$ and proceed normally, except that at some point we follow one of those new $\epsilon$-transitions, simulating reading an $a$ and shifting over to $M_2$; then we continue just as if we were in the original $M$. The shift from $M_1$ to $M_2$ can happen only once, so we can delete only one $a$, and I’ve arranged matters so that we must delete one $a$ in order for the word to be accepted; how?