Consider a simple finite graph such as this graph
If we start at $A$, what is the expected number of steps to return to $A$?
I know that the answer is $4$, but I'm not too sure how get this. Can anyone help me?
I calculated the transition matrix to be :
$$ P= \begin{pmatrix} 0 & 1 & 1 &1 & 0 \\ 1 & 0 & 1 & 0 & 1 \\ 1 & 1 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 1 \\ 0 & 1 & 0 & 1 & 0 \\ \end{pmatrix} $$ with states A,B,C,D,E
and the adjency matrix: $$ B= \begin{bmatrix} 0 & 1/3 & 1/3 &1/3 & 0 \\ 1/3 & 0 & 1/3 & 0 & 1/3 \\ 1/2 & 1/2 & 0 & 0 & 0 \\ 1/2 & 0 & 0 & 0 & 1/2 \\ 0 & 1/2 & 0 & 1/2 & 0 \\ \end{bmatrix} $$ with states A,B,C,D,E
What should i do next?

Hint:. If $\ s_X\ $ is the expected number steps to return to $\ A\ $ starting from state $\ X\ $, then $\ s_A, s_B, s_C, s_D, s_E\ $ must satisfy the following equations: \begin{align} s_A&=1+\frac{1}{3}\left(s_B+s_C+s_D\right)\\ s_B&=1+\frac{1}{3}\left(s_C+s_E\right)\\ s_C&=1+\frac{1}{2}s_B\\ s_D&=1+\frac{1}{2}s_E\\ s_E&=1+\frac{1}{2}\left(s_B+s_D\right)\ . \end{align} The last four of these give you four linear equations for the four unknowns $\ s_B, s_C, s_D, s_E\ $: $$ \pmatrix{1&-\frac{1}{3}& 0& -\frac{1}{3}\\ -\frac{1}{2}&1&0&0\\ 0&0&1& -\frac{1}{2}\\ -\frac{1}{2}&0& -\frac{1}{2}&1}\pmatrix{s_B\\s_C\\s_D\\s_E}= \pmatrix{1\\1\\1\\1}\ , $$ which you should be able to solve by Gaussian elimination. You can then calculate the value of $\ s_A\ $ by substituting the values of $\ s_B, s_C, $ and $\ s_E\ $ back into the first equation.
Note: The titles of the matrices you've given need to be swapped: the adjacency matrix is the one whose entries are all ones and zeroes, and the transition matrix is the one whose entries are zeroes, halves and thirds.