Hi, can someone please explain what to do, stats really isn't my thing, so if you could please explain your answer, I'd really appreciate it!

3 red cubes, 4 blue, 6 yellow are arranged in a row. find the probability that (a) the cubes at each end are the same color

and (b) the cubes at each end are of a different color.

Thanks a lot!