Properly melting butter and sugar together for butterscotch bar recipe I've been trying to make butterscotch bars. I'm not a new baker, but I don't have much experience in melting brown sugar and butter together.

The recipe (included at bottom of post) I'm using says that I need to melt butter and add brown sugar, and stir until sugar is melted. 

When I first tried it, everything went well. Butter and brown sugar were mixed as one and it kinda looked like toffee. On my next attempts, I couldn't get the same result anymore. When the brown sugar melts, it doesn't incorporate with the butter anymore and it turns really hard like candy. So, what I get is hardened (but still grainy) brown sugar in a pool of melted butter.

Please give me some tips and techniques to properly melt butter and brown sugar together so that the result is like gooey toffee. I hope it can be done without candy thermometer. The author of the recipe didn't use one, and I think the quantity of the sugar-butter mixture is too little for me to dip a thermometer in it.

Thank you!

The recipe:

1/4 cup unsalted butter,
1/4 cup butter compound (I think it's half butter half margarine),
1 cups dark brown sugar,
1 large egg,
1/2 tsp vanilla extract,
1/2 tsp baking powder ,
1 cup flour,
1/8 tsp salt


In a small pot, melt the butter and butter compound over low heat. Add the sugar
and stir until melted. Turn off the heat. Preheat the oven to 325°F and 
grease an 8" baking pan. 
In a large bowl, sift the flour with the baking powder. Add the salt. 
When the sugar mixture has cooled, add the egg. Mix well after addition.
Add the flour mixture and mix until just incorporated. Add the vanilla and mix one last time. 
Pour the batter into the pan and bake for 25-30 minutes or until the cake 
is set. 


P.S.: I haven't tried to actually let the mixture come to a boil because, as I said, the brown sugar becomes so hard and candy-like when it melts, and I'm afraid it gets even harder if I let the mixture boil. Please give me tips regarding boiling it. Thanks a lot for helping this newbie out. :)
In the past I have had a similar issue with making a butterscotch drink recipe.  What I have found is that adding a bit of water to the melted butter (1-2 tsp/1/2 c, 5-10mL/120mL) helps dissolve the brown sugar and prevents graininess and seizing.  Sugar is not readily soluble in fat, so it needs water in order to dissolve.

I suspect one of three things happened:


Different batches of butter may have different water contents.
The brown sugar may have lost some of its moisture as it sat around in the
pantry.
Some of the water may have evaporated off while melting the butter.


If you heat brown sugar in butter without enough water some will dissolve in the water present from the butter and the brown sugar, but it will become grainy and seize as the water is evaporated and the undissolved sugar granules act as nucleation sites.  Meanwhile the undissolved sugars are being lightly fried in the fat from the butter.