Let $T\colon (x,y)\mapsto (x-y,y)$. Then $E[g(B_t,B_s)]=E[h(B_t-B_s,B_s)],$ where $h(T(x,y))=h(x-y,y)=g(x,y)$. This gives, using independence of the increments of Brownian motion, and a density of $(B_t-B_s,B_s)$, and a substitution, \begin{align} E[g(B_t,B_s)]&=\int_{\Bbb R^2}h(u,v)\frac 1{\sqrt{2\pi(t-s)}\sigma}\frac 1{\sqrt{2\pi s}\sigma}\exp\left(-\frac 1{2\sqrt{\sigma}}\left(\frac{u^2}{\sqrt{t-s}}+\frac{v^2}{\sqrt s}\right)\right)dudv\\ &=\frac 1{2\pi\sigma^2}\int_{\Bbb R^2}g(x_1,x_2)\exp\left(-\frac 1{2\sqrt{\sigma}}\left(\frac{(x_1-x_2)^2}{\sqrt{t-s}}+\frac{x_2^2}{\sqrt s}\right)\right)dx_1dx_2. \end{align}
We can generalize this: if $t_1<\dots, let $T$ the map given by $T(x_n,\dots,x_1)=(x_n-x_{n-1},x_{n-1}-x_{n-2},\dots,x_2-x_1,x_1).$ Let $h$ such that $h(T(x_n,\dots,x_1))=g(x_n,\dots,x_1)$. Then, writing $t_0=0=x_0$, \begin{align} E[g(B_{t_n},\dots,B_{t_1})]&=\int_{\Bbb R^n}h(T(x_n,\dots,x_1))\prod_{j=1}^n\frac 1{\sqrt{2\pi(t_j-t_{j-1})}\sigma}\exp\left(-\frac{s_j^2}{2\sigma\sqrt{t_j-t_{j-1}}}\right)ds\\ &=\int_{\Bbb R^n}g(x_n,\dots,x_1)\prod_{j=1}^n\frac 1{\sqrt{2\pi(t_j-t_{j-1})}\sigma}\exp\left(-\frac{(x_j-x_{j-1})^2}{2\sigma\sqrt{t_j-t_{j-1}}}\right)dx. \end{align}