If I have the AES-CBC encrypted string along with the IV and the plain text before encryption, how can I compute the key which was used for encryption?
If I had a way to do this, I would be rich (at least temporarily, until I moved on to smashing the capitalist system before the money got to my head), because trillions of dollars of economic value in communications across the world are secured by the assumption that you can't.
It's kinda one of the design principles of modern cryptography. Not only can you not figure out the key, but you can't even distinguish another encrypted message under the same key from random noise, no matter how many plaintext/ciphertext pairs you have of your choosing, up to limits that are beyond the reach of humanity. This property is sometimes called ‘indistinguishability under chosen plaintext attack’, or IND-CPA.