in the second punic war between carthage and rome carthage formed an alliance with