I am having trouble with this formula any help would be appreciated.

Column A contains one of 5 categories. Column B may or may not have relevant information about it. I am trying to write a formula that takes all the seperate information from a category in Column A, and combines it into a single cell. Too complicated for me!! I figured its possible just because its excel but i cant figure it out.

Thanks!