Tā zuótiān yìzhí zài Běijīng, bù kěnéng lái guo Shànghǎi.
He was in Beijing all day yesterday, so he can't have been in Shanghai.
Tips
grammar
As an adjective it often takes 是…的: 这是不可能的 'that's impossible'. Before a verb it means 'can't possibly': 他不可能来 'there's no way he's coming'. To say 'unlikely', soften it to 不太可能.