The longest object that can fit in a cylinder is a rod (ignoring its thickness) reaching from one end of the cylinder all the way to the other end.
This creates a right triangle with it's sides being the height of the cylinder and the diameter of the circular base.
radius = 2.25 in [So the diameter = 2*r = 4.5 in]
height = 8 in
Using the Pythagorean theorem, we can find the hypotenuse:
c2 = a2 + b2
= 4.52 + 82
= 20.25 + 64
c2 = 84.25
c = √84.25) = 9.2 inches