First you know the PTO is 540. Mark a line on the input shaft coupler at the housing of the rt. angle gear box and the output shaft of the gearbox. Rotate the input shaft through one complete revolution so that the line is back where you started. If the output shaft is also back where it was, give or take a little slop, then you have a 1:1 meaning the drive gear is turning 540 rpm at engine PTO speed.
If it didn't line up, counting the turns, continue to rotate the input shaft until it does. If for example it takes 2 complete turns of the input shaft to make the output shaft marks line up then you have a 2:1 reduction box and the drive gear turns at half 540. The converse is true too. If you are only half way around on a rev of the input shaft and the output shaft marks line up you have a 1:2 and the drive gear is running at 2x 540.
Once you have calibrated your drive gear it's merely a ratio of the teeth. Since each roller of the chain touches each gear they are all locked together and it is just a matter of how many teeth went by the drive gear cal mark vs how many on the driven.
So count the teeth on each gear and you have your answer.
If the drive gear has 20 teeth then to make a rev, it has passed 20 chain links. If a driven gear has 20 teeth it will also go through 20 links to make a rev and it is running at the same speed as the drive gear.
If fewer teeth the driven gear will be running faster as it can complete a rev before the drive gear does and the speed is just the number of teeth ratio vs 540. The converse is true.
So If I have 20 teeth on the drive and the driven has 24 for example then with more teeth on the driven it will move slower so that means 20/24 x 540 = .83 x 540 = 450 rpm.
If I have 20 on the drive and the driven only has 16 then that is fewer teeth meaning it will run faster so 20/16 x 540 = 1.25 x 540 = 675 rpm.
On the two crimpers I have, both bottom rollers are smaller diameter than the the tops and have fewer gears. That's because since the distance around the smaller roller is shorter than the distance around the larger roller, it has to make more than one turn to equal one turn of the large one, hence fewer teeth.