Man learns CPR two days before friend suffers heart attack