How to use the distributive property with variables