Andy starts a business with $168 000 as capital. Six months later, Billy joins Andy with a capital of $144 000. One month after that, Calvin joins them with a capital of $324 000. At the end of the first year, the profit is $40 000. How much do Andy, Billy and Calvin get if their shares are in proportion to their investments?