What are the components of cost analysis? When would you use cost analysis versus price analysis? How is one better than the other at different times?

What are the components of cost analysis? When would you use cost analysis versus price analysis? How is one better than the other at different times?