the length of these two lines are almost same but it shows almost a double times of different cm?? Why this happens?
You can either scale an object in Object Mode or its mesh in Edit Mode. If you scale in Object Mode and don't apply the scale with Ctrl+A, the object has two different sizes: the visual size shown in the Dimensions and its original size from which you scaled it to be larger or smaller.
If you go into Edit Mode, the lengths that are shown on edges or areas on faces are the ones of the original mesh size, no matter how much you scaled it in Object Mode.
But when you instead scale a mesh in Edit Mode, you are changing its original size of the underlying mesh. So although the overall scale in Object Mode might still be 1, the mesh is now larger or smaller than it was before.
Take a look at the following planes, I selected them both and switched to Edit Mode to see the lengths of their top edges. I scaled the front plane by factor 2 on the Y axis in Edit Mode, the rear plane was scaled by 2 on Y axis in Object Mode. Although the edges are visually exactly the same length, the front edge shwos 4 m while the rear edge shows 2 m.
If I now switch back to Object Mode and look at the properties of the front plane, it shows a scale of 1 on all axes, we especially care for the Y value now. The scale is 1, the Y dimension is 4 m.
Now the rear plane shows something different, it also has a Y dimension of 4 m, but the Y scale is 2 instead of 1. This means, the Y dimension of the object is not the mesh's original size, it's twice as large. So the original dimension is 4 m / 2 = 2 m, just as we can see in Edit Mode.
And just for comparison: the Z scale was 1 and Z dimension 2 m on both objects, and if we take a look at the lengths of the vertical edges in Edit Mode they indeed show the same length of 2 m.
What you experience now when joining the two objects together is that a single object can only have one scale in each direction. So depending on which object was the active one while joining them, now both planes will have either scale 1 or 2 on the Y axis. And therefore they will in Edit Mode both show the same length which will either be 4 m or 2 m.
To convert a scale executed in Object Mode so that it becomes the original mesh size in Edit Mode you have to apply the scale by pressing Ctrl+A > Apply > Scale. This is not only to stop the confusion about edge lengths, but very often really important for a lot of tools. For example if you are beveling, insetting or extruding things or using a Solidify modifier it might give weird results if you expect even offsets, even thicknesses etc. but these are dependent on the original mesh size. Unapplied scales might give problems with animating, armatures, texturing and lots of other tools and methods.