Hello,

Let A be the transition matrix. It's a 2x2 matrix because there are only two states. Since the probability of staying in the same state the next day is p, you will have p in the diagonal. And q otherwise.

it can be diagonalized : its eigenvalues are 1 (eigenvector (1,1)) and p-q (eigenvector (1,-1)).

So , where (matrix of the eigenvectors) and

Also note that

Hence

But the element in denotes (more or less)

And you're looking for , so you'll be looking at the (1,1) element of the matrix