Whenever i try to delete these lines it deletes the faces of the entire kitchen. is there a way to merge them?

Is there a way to merge the two faces?

If erasing the edges removes the faces, the faces are not in the same plane. You could hide those edges although that won’t fix the lack of co-planarity. Or you can redraw things so the faces are in the same plane.

Okay thank you

Perhaps I’m being dense, but your question confuses me in two ways. First, which lines are you asking about? Eight are visible in the image, and I’m sure there must be a lot more in an entire kitchen. Second, are you really saying that erasing an edge takes all the faces in the kitchen away too? It should only affect faces that use that edge, and I can see multiple edges in the image that are not used by all the visible faces.

If you can share your model here, we can give you a more definitive answer.