I will try to add something Tiger Guy's answer, which I think is spot on.
Ah and V
For the DeWalt 20V Lithium-Ion with 5.0 Ah Battery, the 5Ah Battery means that is can provide energy equal to 1A for 5h (or 5A for 1h). However you don't know the actual discharge rate. So, you only know the capacity of the battery (same as knowing the size of the fuel tank of a vehicle).
If you multiply Volts with Amps you get Wh. So
- DeWalt : 100 Wh
- Ryobi : 200160 Wh
From the comparison the Ryobi has a larger capacity (so I would expect the batteries to be bulkier).
Voltage and motors.
This is the tricky part. Regarding what people in general refer to as a powerful motor/hand tool is (IMHO) the torque that it produces. I.e. if a tool produces more torque then it is more "powerful".
The torque of a motor is strongly related to the motor (and more specifically its characteristics) and the current flowing through it. Typically nowadays (I hope I am not that outdated), power tools use brushless DC Motors.
Figure: Brushless DC Motor (Source: youtube video)
However, (in most DC motors) - for a given configuration (e.g. number of windings, thickness and resistance of wire) if you increase the voltage, the current also increases and therefore you increase the torque. Brushless motors in particular have a KV rating which shows the rpm per voltage applied.
However, the configuration of the motor is not fixed, so you can have different motors at each product, with different power requirements. Unless you actually go into the datasheet of the power tool and maybe even the motor, its not easy to understand which is more powerful.
Final thoughts
(I don't expect this will help you directly with your decision which chainsaw to buy, but) keep in mind that numbers next to technical quantities are often used (almost) out of context for marketing purposes from companies. So, (usually) you get what you pay for.
Also, I'll close with continue the analogy from vehicle: The Battery is the fuel tank and the motor is ... the vehicle engine (and the drivetrain to some extent). You can have a more powerful engine which means that you can go faster and accelerate more (but the fuel consumption is greater so your run out of fuel faster. Or with a smaller engine, the acceleration and the speed is less, but the fuel tank lasts more hours. However, unless you pop the hood, or start up the vehicle, you don't really know what engine or the drivetrain is underneath.