If a firm producing in long run using capital and labour inputs,how the least cost combination of the input will be determined? show it mathematically and graphically

If a firm producing in long run using capital and labour inputs,how
the least cost combination of the input will be determined? show it
mathematically and graphically