X&\frac{a}{{Y}^{2}} have the same dimensions. Y&b also have the same dimensions.
Therefore,
Y2a=ML−1T−2⇒a=ML−1T−2×L6=ML5T−2
and b=L3.
So, the dimensions of ba is,
ba=L3ML5T−2=ML2T−2.
This is the dimensional form of energy. Hence, this is the right option.