I have tried to Google the questions but they have given vague answers such as; "China around 2000 years ago" Or "Roman and Greek times". Thanks for the time.
I don't know if this helps you at all, but Vitruvius (who writes in the time of Caesar) explains how siege machines came to be in book 10 in his Ten books on Architecture. Starting with: "IT is related that the battering ram for sieges was originally invented as follows. The Carthaginians pitched their camp for the siege of Cadiz."
Onto:
"These were the first steps then taken towards that kind of machinery, but afterwards, when Philip, the son of Amyntas, was besieging Byzantium, it was developed in many varieties and made handier by Polyidus the Thessalian."
"And finally the part you might be interested in:
Issuing up and above the middle of the roof for not less than two cubits was a gable, and on this was reared a small tower four stories high, in which, on the top floor, scorpiones and catapults were set up, and on the lower floors a great quantity of water was stored, to put out any fire that might be thrown on the tortoise."
I believe the trebuchet was invented much later, during Medieval times, as a result of walls getting higher and thicker. I don't have a specific source for that though.