The purpose of a sling in a trebuchet is to improve energy transfer. Ultimately, you don't need to worry about it, unless you are actually designing a trebuchet.
You have two conservation laws. Trebuchet will conserve energy and it will conserve angular momentum. That gives you two equations in two unknowns, the unknowns being the final velocities of projectile and counterweight. Write down both equations and solve them together. Angular momentum conservation is a linear equation, so use it for substitution into the energy conservation equation, which should yield a single quadratic equation for final velocity of the projectile.
It's pretty straight forward. Just make sure your signs are consistent.