Discrepancy in modular encryption
This is a toy system that is used in didactic contexts as an introduction to RSA, in a way. 

We have some prime $p$ (we are going to do the power operations modulo this prime).
If $m$ is the message (an integer in $\{1,\ldots,p-1\}$), we have some encryption exponent $e$, and encryption indeed works as $$E(m) = m^e \pmod{p}$$.

So for $p=23$, $e=9$ we indeed have $E(21)=17$, as $21^{9} = 17 \pmod{23}$.

The decryption exponent $d$ can be found by solving $ e \times d = 1 \pmod{p-1}$ (the $p-1$ is $\phi(p)$ and Euler's/Fermat's theorem tells us that $m^{\phi(p)} = m \pmod{p}$ for all non-zero $m$.) So exponentiation with $d$: $$D(m)=m^d \pmod{p}$$ is the inverse of $E$ and vice versa.

In your number example with $p=23, m=21, e=9$ we have $p-1=22$ and $9 \times 5 = 1\pmod{22}$ and indeed $D(17)=17^{5}=21\pmod{p}$ as expected: we get back our starting value $m$. 

In #3 you know $E(m)=15$ so $m=D(15)=15^5 \pmod{23}= 7$. You should distinguish $E = E(m)$ from the exponent $e$. 

So this system crucially depends on $e$ being kept secret, otherwise $d$ is pretty trivial to compute via Euclid's algorithm (that's how I found $d=5$ too) and anyone can decrypt. RSA depends on the fact that given $n$ of the form $pq$, with large unknown $p$ and $q$, makes it hard to find $\phi(n)$ and hence $d$ from $e$, as we find $d$ by solving $e \times d = 1 \pmod{\phi(n)}$ where $n$ is the modulus we are using, like $p$ in your case.