Trying to figure out what this is it came out of my 64 barracuda 318 4 speed

Can you switch the ball and trunnion to a slip joint? ps if you run the 340 go with the 10.5 clutch.
Yes, if you use the slip joint main shaft and extension housing.

You can also get a conversion driveshaft to replace the ball and trunnion u-joint which uses (I think) a Chevy truck type bolt on flange with a slip spline the goes into it.

1726943374934.jpeg