Douglas Costa's stoppage time strike resuced the three points for Brazil as they defeated Peru 2-1 in their opening 2015 Copa America game on Sunday.