Hi Lee,
Getting the sq meter from length and width is basic math, This can be done in JavaScript. Based on the total sq you can use the AJAX/XHR API to add to cart the modified quantity. So if the length is 2 meters and the width is 4 meters you will add to cart 8 times the unit price.
Depending on other customization needed from this I can give a quote. Please see my email in the signature.
Thank you.