This can be solved with Modulo Arithmetic,
. . but here is an algebraic solution.
Let = the number.Find the smallest number which when divided by 28 gives remainder 8,
and when divided by 32 gives remainder 12.
Equate  and : .
. . Then: .
Since is an integer, must be a multiple of 7.
. . The first time this happens is: .
Substitute into : .