Q:

Cropping two layers of polygons using QGIS

I am new in QGIS and I would like to know if it's possible to crop two layers of polygons.
I have a layer A with some polygons and a layer B with some others.
I want that if the distance of one polygon of the layer A is shorter than 5m to a polygon of the layer B, it moves the border of the layer A to 5m.

A:

Use the Buffer tool to make a 5 m buffer around layer B. 

Use the Difference tool to subtract the buffer layer from  layer A.

