Sum of multiple velocities

I have a player object that can shoot a projectile at a velocity of x. When the player starts moving forward, I need the projectile velocity to now be the sum of the player’s forward velocity y and the projectile’s base velocity of x.

What I currently have is:

projectile.velocity = (projectile.transform.forward + player.transform.forward) * projectileSpeed;

This doesn’t seem to work.

How would I do this?

projectile.velocity = projectile.transform.forward * projectileSpeed + player.rigidbody.velocity;

player.transform.forward is merely a vector that describes how the object is rotated.