Let #\theta# be the angle between the sides #16# & #9# then the area of parallelogram
#2(1/2(16)(9)\sin\theta)=21#
#\sin\theta=\frac{21}{144}#
#\sin\theta=7/48#
#\implies \cos\theta=\sqrt{1-\sin^2\theta}\ \quad (\because \theta<\pi/2)#
#\cos\theta=\sqrt{1-(7/48)^2}#
#\cos\theta=\frac{\sqrt2255}{48}#
Now, since #\theta<\pi/2# hence the longest diagonal of parallelogram will be opposite to the angle #(\pi-\theta)#
Let #d# be the length of longest diagonal parallelogram.
Applying cosine rule in a triangle with sides #16, 9# & #d# & #(\pi-\theta)# opposite to the side (diagonal) #d#
#\cos(\pi-\theta)=\frac{16^2+9^2-d^2}{2(16)(9)}#
#-\cos\theta=\frac{337-d^2}{288}#
#-\frac{\sqrt2255}{48}=\frac{337-d^2}{288}#
#d=\sqrt{337+6\sqrt2255}#
#=24.938#
Hence the longest diagonal of parallelogram is #24.938\ \text{unit#