I would like to show that for $a\leq s < t\leq b$, the function
$$f(x) = \begin{cases} 1,\,&\mbox{ if }s<x<t;\\ 0,\,&\mbox{ otherwise} \end{cases}$$
is Riemann-integrable on $[a,b]$ and that this integral has value the $t-s$.
So far, my line of thinking has been to let $P$ be a general partition $a = x_{0}<x_{1}<\ldots<x_{n} = b$, take $M,N$ to be such that $s\in [x_{M-1},x_{M}]$ and $t\in [x_{N-1},x_{N}]$, and then write down the lower- and upper-Riemann sums of the function $f$ on $[a,b]$ depending on whether $s\in (x_{M-1},x_{M})$ or $s \in \left\{x_{M-1},x_{M}\right\}$ (and similarly for $t$).
My question is this: is my line of thinking a good way to approach the problem, and if so, where do I go from here? If my line of thinking is not likely to be productive, please point me in a better direction. Thanks!
Your approach is correct and leads to a correct argument, but another, possibly simpler, argument exists by taking specific partitions and considering their corresponding upper and lower sums.
For example, you can define partitions $$ Q_n = \{a, s - \frac{1}{2n}, t + \frac{1}{2n}, b\}, \qquad P_n = \biggl\{a, s + \frac{1}{2n}, t - \frac{1}{2n}, b\biggr\}. $$ For large enough $n$, these partitions are written in increasing order and so we have that \begin{align*} U(f, Q_n) &= t - s + \frac{1}{n}, \\ L(f, P_n) &= t - s - \frac{1}{n}. \end{align*}
In this way, $$ L(f) \geq \limsup_{n\rightarrow \infty} L(f, P_n) = \liminf_{n\rightarrow \infty} U(f, Q_n) \geq U(f) $$ so that $L(f) = U(f)$ and $f$ is Riemann integrable.