I sort of assumed that Marx's labour theory value just meant that all costs could be decomposed into wages and profits, the sum of which is called "labour". But it seems reasonable to think that for each product produced, the decomposition of wages and profits will have the same ratio, i.e. the price of any product produced under perfect competition will be in proportion to the labour expended on it. Paul Samuelson's refutation of the theory of labour proportional prices* is a consistant centre of ideas around the "marxist transformation problem". Below, I try to give an example of how Samuelson's algebraic proof might be played out, using made up numbers. The value of capital is equivalent to funding for the costs incurred, which are all paid at the same time, and the rate of profit is 25%.
Suppose an economy consists of three sectors, of which the first supplies producers' goods to the other two:
All these goods are sold to capitalists in the consumer goods industries, sectors two and three.
The costs paid by sectors two and three represent the income of sector one. This income can be broken down into wages and profit at the rate of 4 : 1. Hence sector two's costs represent £30 of profit and £120 of wages for sector one, and sector three's costs represent £10 of profit and £40 of wages for sector one. Of the total wages cost expended across all three sectors in producing consumer goods, £170 was input into the products of sector two, and £190 into the products of sector three. Since labour is homogenous, the ratio of the wage costs of any two sectors of the economy is the same as the ratio of labour input.
The ratio of the value of the output of second sector to the value of the output of third sector...
...by the price of total output is 250 : 250
...by labour inputs is 170 : 190
This shows that the Ricardian labour theory of value, where commodities' "relative values will be governed by the relative quantities of labour bestowed on their production" is not realistic. The exceptions to this rule, where the theory does hold, are where the interest rate is zero or where all sectors of the economy have the same ratio between direct wages and profit.
Essentially, what skews the values of any output from a value proportionate to the labour input, is that the mere use of the capitalists' assets, themselves products of labour, is exchangeable for other products of labour. That is, the conditions of capitalist production prevent the exchange of commodities at values proportionate to their labour inputs.
*see the Wikipedia page on the transformation problem for Samuelson's argument