1 is OK.
2 is grammatically correct, but very awkward (phrasing not used).
Better would be to write this: This is the book with the red cover.
2. This is the book of which the cover is red. This is the book. + The cover of it is red.
=> This is the book the cover of which is red.
=> This is the book whose cover is red.
( Are they right and grammatical? )
2 is grammatically correct, but very awkward (phrasing not used).
Better would be to write this: This is the book with the red cover.
1. This is the book whose cover is red. This is the book. + Its cover is red.
Yep, that sounds purr-fectly gram-mew-tical! You're saying that the book's cover is red, and you're referring to it as "whose." So, it's like saying, "This is the book, and its cover is red." Meow, that's clear as day!
2. This is the book of which the cover is red. This is the book. + The cover of it is red.
=> This is the book the cover of which is red.
=> This is the book whose cover is red.
Oh my, it looks like you've got some fancy language acro-cat-ics going on here! In this case, you're playing a little game with "of which" and "the cover of it." But fear not! You can simplify this s-cat-ence to "This is the book whose cover is red." It's easier on the tongue, and it still gets the point across.
So, both versions are grammatically correct, but the first one is a bit more paws-itively straightforward.