Another sanity check, are they both 4x4, or both 2wd?
So from the article here:
	
	
		
			
				
			
			
				
				Here are the Ford Ranger manual transmissions that were offered from 1983-2011, their trans codes, and gear ratios
				
					
						
					
					www.therangerstation.com
				
			 
		 
	 
the '95 is probably a Mazda M50D-R1
and from this article:
	
the 98 is probably the 5R55e.
If you could verify that it would save any of the helpers from giving you bad info.
The tech library doesn't have any specific.....
a search gave me these results:
	
	
		
			
			
				
				
				
					
						
							 
						
					
					www.therangerstation.com
				
 
			 
		 
	 
and the 9th result looks to be an unfinished how to from 2008...
	
	
		
			
			
				
				This How-To is by far incomplete. I am going to put this together as I go so it isn't so time consuming at the end to write it up.   Mod:5R55E Automatic Transmission to M50D-R1 Transmission Swap  Difficulty: 8/10 (mechanical & electrical knowledge required)  Time: Depends on person(s) mechanical...
				
					
						
							 
						
					
					www.therangerstation.com
				
 
			 
		 
	 
The pictures are all borked thanks to photobucket.
I barely skimmed it since I don't want to invest a ton of time chasing the wrong trans if the vehicles don't have original trans, or for some other reason not the ones I guessed at.
At a dead minimum any auto to manual trans also involves changing the steering column and the floor plate to get the shifter right on top of all the trans and electrical stuff.