Both sentences are excellent. The only change I would make would be to say "author" instead of "writer" to avoid the repetition of using the words "written" and "writer" in the same sentence.
It is true that the first option uses passive voice twice, and passive voice is often frowned upon, but that is not a concern here. Passive voice is appropriate when you need to make something happen without specifying what or who makes it happen. That is exactly what you need here.
In this situation, replete with uncertainty, past participles are ideal. My favorite of the two is the first ("believed to have been written"). I just prefer the way it sounds. Maybe I like it more because it takes the point of view of the book. Rather than thinking of the book as a "thing" it treats the book with more respect, talking about its experience of having been written. It sort of humanizes the book, in some poetic sense, giving it more respect.
But no need to take my advice! That's just the way I like to talk. Language is personal.