a) 
b) 
c) L = 2.51 m
Explanation:
a)
The position of the cannonball at time t is given by

This is the position of the cannonball inside the barrel, measured with respect to the starting point.
The velocity of the cannonball can be found by calculating the derivative of the position; we find:

Similarly, the acceleration of the cannonball is given by the derivative of the velocity, so we find:

Here we are told that the acceleration of the ball at the end of the barrel (so, when x = L, where L is the length of the barrel) is zero, so:

Where t' is the time at which the ball reaches the end of the barrel. Solving the last equation for t',

b)
In part a, we have calculated that the time it takes for the cannonball to reach the end of the barrel is

We also know that the expression for the velocity of the ball is

Therefore, if we substituting t = t', we can find the velocity of the cannonball when it exits the barrel:

And this is equal to the speed of the cannon: in fact, when it is in the barrel, the motion of the cannonball is along one direction only, this means that the speed is equal to the magnitude of the velocity.
c)
Here we want to find the length of the barrel.
From part a) and b), we know that the expression for the position of the cannonball at time t is

Moreover, we also know that the ball exits the barrel at time of

This means that at t = t', the ball is at x = L, where L is the length of the barrel.
Therefore, we can find the length of the barrel by substituting the value of t' in the expression for x(t). Doing so, we find:

So, the length of the barrel is 2.51 m.