Garage question on a duplex

Hi all,

I have a question regarding building a garage in the back. The home is a duplex and as you can see in the picture, the left one is what I put an offer on. The right one is someone else's (neighbours haven't moved in yet but have purchased it from the builders).

The question I have is that the garage gravel pads for both the units of the duplex has no spacing. See the images - two gravel pad and both separated by the wooden section. The middle is the plot line of the houses. Please see the drawing.

The builder has mentioned that I cannot build a garage if my neighbour in the other half of the duplex does not agree to it. I need their consent and they need mine.

I haven't purchased the property yet, I love it but this has put me off. I wanted to understand if this is correct. My worry is if I purchase the property and the neighbour does not decide to build the garage. Then I am left without a garage.

Please let me know if there is any way to build a garage and if it's possible to build without having to deal with the neighbour.