Possibly, you're looking for 3 and 5.
The square of 3 added to 3 times 5 is 24. However, 5 is not "the median integer."
The median of two consecutive odd integers is the even integer between them. As written here, the problem makes no sense, there is no way adding the square of an odd number to 3 times an even number can give 24.