aligning top and bottom of two objects
You can use snapping options to do that.


Set snapping on and choose the closest to vertex option (under the green arrow bellow)





Enter edit mode for one of the objects
Select all the vertices
Then point your mouse to the bottom of the second object and grab G





Now position the 3D cursor to the bottom : select one of the bottom vertices, then Shift + S and cursor to selected





Back to object mode
Set the pivot to 3D cursor
Then scale S and point to the top of the second object