Ultrasonic Sensor and LCD Display code help needed !!

but i know nothing about electronics.

This isn't about electronics. It's about coding. I'll tell you what, though. You go through both sketches you posted, and add comments that describe what is happening. I'll review the comments, to see whether they are accurate.

After that, if you still can't figure out what to cut-and-paste to create a single sketch, I'll do it.