- in on arrow can be placed several nose.With their option(s) can be set above or below arrow, or on any other position on arrow,
- labels on arrows you can write with help of
quotes
library
- option
auto
positioned labels on arrows depending on arrow direction. See @Qrrbrbirlbel comment below()thank you for pointing this)
\documentclass[margin=3mm, preview]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, automata,
quotes}
\begin{document}
\begin{tikzpicture}[auto,
node distance = 22mm,
> = Stealth
]
\node[state, initial] (p) {p};
\node[state,accepting, right of=p] (q) {q};
%
\draw[->] (q) edge[loop above] node{a} (q);
\draw[->] (p) edge node[above] {b} node[below] {c} (q);
\end{tikzpicture}
\bigskip
\begin{tikzpicture}[auto,
node distance = 22mm,
> = Stealth
]
\node[state, initial] (p) {p};
\node[state,accepting, right of=p] (q) {q};
\draw[->] (q) edge[loop above, "a"] (q);
\draw[->] (p) edge["b", "c" '] (q); % or "swap" instead of '
\end{tikzpicture}
\end{document}

\path (p) edge node[above] {b} node[below] {c} (q);
should do it.edge[above]
makes all following nodes useabove
(i.e.anchor=south
), though it should be possible to doedge[above] node{b} node[below]{c}
.