I'm assuming you're in calculus based physics. I apologize if otherwise.
Let's come up with equations for distance and acceleration as functions of time.
From the definition of acceleration we know thata=dvdtTaking the derivative of v with respect to t yieldsa=dvdt=(−5.15∗107)∗2∗t+(2.30∗105)
From the definition of distance, we know that v=dxdt→dx=vdtIntegrating velocity yieldsx=(−5.15∗107)∗(t33)+(2.30∗105)∗(t22)+x0 where x0 is the starting position.
If acceleration is zero when the bullet leaves the barrel, we can use our equation for acceleration to determine the time the bullet is in the barrel. This is seen as0=(−5.15∗107)∗2∗t+(2.30∗105)→t=−(2.30∗105)(−5.15∗107)
Knowing time, we can solve for the velocity as the bullet leaves the barrel by plugging time back into our given equation for velocity.
The length of the barrel can be solved by plugging time back into our equation for distance and setting x0=0.