Hello, I am wanna understand how to integrate out some conjugate prior, particularly in high dimension form. its principal is simple, just find the right piece of terms for one specific distribution and integrate out. the challenging part is in high dimension and in matrix form. Please see attached figure. Thanks.

my question is how to integrate out beta in 22, i.e. how to derive from 22 to 24, it seems easy to integrate out sigma since it is one dimensional.