How can i show lookup field id

How can i show lookup field id

How can i show lookup field id using formula , custom function or any other method