Answer :

[tex]2(4-d+2d)=12\\ 8+2d=12\\ 2d=4\\ d=2[/tex]