Help me in solving CAESAR problem

My issue

What is the difference between following two snippets:

Test case 2,3 pass with:
char ch = u[j]-‘a’+k;
if(ch>=26){
ch-=26;
}
ch+=‘a’;
ans+=ch;

But they fail with:
char ch = u[j]+k;
if(ch>=123){
ch-=26;
}
ans+=ch;

My code

#include <bits/stdc++.h>
using namespace std;

int main() {
	
	int q;
	cin>>q;
	
	for(int i=0;i<q;i++){
	    
	    int n;
	    cin>>n;
	    string s,t,u, ans = "";
	    cin>>s>>t>>u;
	    
	    int k = t[n-1]-s[n-1];
	    if(k<0){
	        k+=26;
	    }
	    
	    for(int j=0;j<n;j++){
	        
	        char ch = u[j]+k;
	        if(ch>=123){
	            ch-=26;
	        }
	        
	       // char ch = u[j]-'a'+k;
	       // if(ch>=26){
	       //     ch-=26;
	       // }
	       // ch+='a';
	       
	        ans+=ch;
	    }
	    cout<<ans<<endl;    
	}
	
	return 0;
}

Problem Link: CAESAR Problem - CodeChef