a. Suppose the two positive integers are n−10 and n+10, and hence n>10. Then the product is equal to (n−10)(n+10)=n2−100 and we are looking for an n>10 such that n2−100+23 ends in the digits 23. But that means we want n2 to end in the digits 00. In other words, we want n2 to be divisible by 100 and thus n to be divisible by 10. The smallest possible solution is n=20 and we see that 10⋅30+23=323 does indeed end at 23. So the smallest possible outcome is 323.
b. We take again the integers n−10 and n+10. Now we need to find, for a certain integer k, a solution for n2−100+23=k2, or n2=k2+77. The difference between two consecutive squares is an odd number that becomes 2 bigger every time. We have that 12−02=1, 22−12=3, 32−22=5, etcetera. In general: (m+1)2−m2=2m+1. We can get 77 by taking m=276=38 and so k=38 and n=39. We see that indeed it holds that 29⋅49+23=1444=382. So it turns out to be possible that the result is a square. In fact, it turns out that this solution is unique, but the problem did not ask us to prove that.