1. My favorite book is The Autobiography of Benjamin Franklin. It was written by Benjamin Franklin. I like it because I can learn a lot of lessons in life.

2. My favorite book is The Autobiography of Benjamin Franklin. It was written by Benjamin Franklin. I like it because I can learn how to live a good life in the world.

3. My favorite book is The Autobiography of Benjamin Franklin. It was written by Benjamin Franklin. I like it because I can follow the way he did to live a good life.
--------------------
Are theses passages grammatical? Correct the errors if any. Thank you.

All are grammatically correct, yes. However, "autobiography" means that he wrote it himself, so the second sentence in each passage is repetitive and not needed.

The passages you have provided are grammatically correct. There are no errors in the provided sentences. They all express the same idea, that the book "The Autobiography of Benjamin Franklin" was written by Benjamin Franklin and the reader enjoys it because it teaches them valuable lessons or how to live a good life.