Hello, Welcome to Just Answer and thanks for your question. Smoking is only one factor in developing any kind of cancer. Many people with lung or pancreatic cancer have never smoked or been around people who do. It is certainly one risk factor and not smoking improves your odds of avoiding all kinds of cancer. However, no one can predict who will get cancer and who won't.
It is uncommon to get lung cancer or pancreatic cancer at 25 whether one smokes or not. Both are more common as a person ages.