We don't know. Shakespeare stopped writing plays about three years before his death. It is possible that he might have been suffering from a mental disease which impaired his ability to write. But that is sheer speculation.
About twenty-five years.
It seems reasonable that Shakespeare's acting career started before his playwriting career, but that makes this question even more difficult to answer, since we have no record whatsoever of which plays, if any, Shakespeare performed in before 1592. The only plays which we now for sure that he played in were Jonson's Every Man in his Humour and Sejanus. We don't even know what part he played.
Scholars have no idea what might have influenced Shakespeare to take up a career as a writer. They can make a few vague speculations, but it is absolute fabrication to suggest that some specific event (like attending any festival) had any influence on this decision.
Scott McCrea has written: 'The Case for Shakespeare' -- subject(s): Authorship, History, Playwriting
Shakespeare's professional life, which included both acting and playwriting, began in the late 1590's (nobody is exactly sure when) and ended when he retired in 1613.
On June 29, 1613, a performance of Shakespeare's Henry VIII (also known as All is True) was halted when the theatre caught fire and burned to the ground. This is the only recorded example of a performance of a Shakespeare play being interrupted during his lifetime.
The cast of His Halted Career - 1914 includes: Cecile Arnold Chester Conklin Charles Murray as The Painter Mack Swain
William Shakespeare's earnings varied throughout his career, but estimates suggest he made around £200 a year by the early 1600s, equivalent to a significant sum today. His income came from multiple sources, including acting, playwriting, and investments in the Globe Theatre. As a successful playwright and shareholder, his financial status improved over time, particularly during the height of his career.
d
Writing was not Shakespeare's only career, and probably not his first.
William Shakespeare is well-known for his career as a playwright, which was part of his overall career in theatre, where he was also an actor and businessman.
an English poet