没关系 = doesn't matter (when something doesn't matter to you, you won't care about it, therefore, it is not a problem at all)
没问题 = no problem (no question needed = no problem = no trouble or obstacle)
Examples:
这一仗如果能打胜,死一两万士兵也没关系 = If we can win this battle, it doesn't matter if 10,000 or 20,000 soldiers die. (The person who says that just doesn't care)
没问题了,你明天来上班吧 = No problem, come to work tomorrow (noall clear - no obstacle to prevent you from being hired)
输掉也没关系,又不是我的钱 It's okay to lose, it's not my money (you don't care)
输掉也没问题,又不是我的钱 It's okay to lose, it's not my money (you won't get into trouble)