Proving equivalency of two security definitions of symmetric encryption schemes how to prove definition 3.8 and 3.9 are equivalence ?



picture is from book an introduction to modern cryptography (2nd edition) by j. katz and y. lindell pdf

and https://repo.zenk-security.com/Cryptographie%20.%20Algorithmes%20.%20Steganographie/Introduction%20to%20Modern%20Cryptography.pdf is link to first edition which definitions can be find on pages 63 and 64 of book as definition 3.9 and 3.10
Intuitive idea: the first definition is saying that an adversary can not do significantly better than random guessing. The second definition says that for two different inputs, the adversary would have the same probability of guessing 1. So to prove the equivalence, start with the first definition. Run this privacy experiment with two different inputs, subtract them, this is your second definition.