to power two DC motors (an H-bridge for each ) and powering the whole thing with a 9V 1A power adapter but i noticed that the transistors ( 2N2222 ) gets really hot ? why is that , and can any one suggest a modification on the circuit or another cheap npn transistor that might work more properly
Your control of of the NPNs might also be causing "shoot thru", where both transistors on one side turn on together, creating a path from 9V to Gnd, and a lot of current draw thru 2 devices, which as noted are not rated for much current flow.
Find an SOIC to DIP adapter and pick up a chip like this https://www.digikey.com/en/products/detail/diodes-incorporated/DMHC4035LSD-13/4570605
If you don't switch transistors fully on/off, then they could get hot.
Base voltage of the two top transistors in emitter follower configuration must be 0.7volt higher than the supply voltage to saturate the transistors. The Arduino pin can't supply that ~9.7volt.
Things get worse because of their base resistors.
If... 20mA would be needed to drive the base of the transistors, then 0.02A*1200ohm= 24volt would drop across the resistors. So the Arduino pin should supply 24+9.7= 33.7volt for this to work.
Should use PNP transistors for the top two transistors, and they must be driven by NPN level-shifters (6-transistor design).
Maybe best to use motor driver chips.
Leo..