Contreras hits 2 homers, Cubs outlast contending O’s 3-2