Hello, sumit2009!

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.

Then: .

Equate [1] and [2]: .

. . Then: .

Since is an integer, must be a multiple of 7.

. . The first time this happens is: .

Substitute into [2]: .