- This is the flyover whose inauguration was done by the transport minister.
- This is the flyover inauguration of which was done by the transport minister.
why 2. is correct??
Sentence 2 does not sound grammatical. Something like this would be better: "This is the flyover the inauguration of which was done by the transport minister." You need a the in there - think of replacing the which with the subject, the flyover, for an equivalent meaning: "This is the inauguration of the flyover that was done by the transport minister." But sentence 1 is also grammatical. Honestly, the (corrected version of) sentence 2 sounds too formal and awkward for a normal person to say. I would prefer sentence 1. Who says sentence 1 is incorrect? See also: https://www.grammar.com/whose-and-of-which/
The first is semantically incorrect, because a flyover is not a "who". There is no equivalent for inanimate objects, which may be why a lot of speakers will actually use it even for inanimate objects, so you might hear the first sentence from a native speaker and no-one think much of it.
There's a relatively rare and not usually accepted equivalent of whose for inanimate objects, which is that's. This word would be an instance of the genitive suffix -'s, used to indicate possession or close association. Unfortunately, there's also the suffix -'s used to show a contraction of is, has or sometimes does, and people generally use that's in the sense of a contraction of is or has. This may be why genitive that's is not generally accepted.
The second sentence would be correct with the addition of a comma, optionally adding another word as well, and some would accept that word being added without the comma.
There are other ways of saying what they are trying to say, though, which would seem more natural.