You can't use single trigger for the event Unit Is attacked
Because, the trigger will be fired even before the damage is done to the unit
Therefore, NO damage calculation is calculated for that trigger
You're doing it right but, just remove the Set life and Change owner and replace with Trigger - Add New Event (requires another new trigger)
Find the Event Specific unit - Action
Make it, Attacked unit Takes damage (Event Response)
Then at the second trigger, input the set life and change ownership
By this way, it's calculated normally.