Finding Distance between Cameras in Stereo Vision
Calibrate your cameras with the same world coordinate system. Use the same checkerboard and take images at the same time with both cameras.

After you have your extrinsic matrices for each camera, you can use this answer here where you need to solve the equation for the position of each camera center in world coordinate system.

Then you can calculate the distance between two coordinates.