没关系 = 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 (no obstacle to prevent you from being hired)