Because value(X) is constant, your observation boils down to a comparison of value(8 hours leisure time) and value(X) + 2 * value(3 hours leisure time).

I did consider the value of leisure time, which I arbitrarily set to $100/hr (I just called this time, but unsold time can be exchanged 1:1 for leisure time). You seem to be objecting to my assumption that the marginal value of time is constant for the workers. I agree with this objection (in fact, I raised it myself in the footnote). However, even without this simplifing assumption, there are still situations where selling ones time is a net positive.

>By restricting the entire world to the two actors wanting to produce one X one can keep money out of the equation.

My entire argument can be made without invoking money. Indeed, I believe the non monetary form is more compelling, but also more abstract. Again, I will invoke the idea indifference. We say that things X and Y have equal value to person A if she is just as happy receiving 1 X as she is receiving 1 Y. With this concept we can replace "money" with any object of value and have an equivalent analysis. Of course, the selected object would itself have diminishing returns, but this is equivalent to an increasing marginal value of ones time, which I have already addressed. Ultimately, to properly explore this route, I would formalize an abstract notion of "utility" as an equivalence class over indifference. I hope this explanation makes sense, doing it properly would take far to much effort to put into an internet comment.

>where is this money coming from, From selling the X to the society?

The above framework provides a nice way to sidestep this issue. Let U be the utility function. So U(5 hours) is the value of 5 hours of time. [0]. For simplicity, assume that A and B share a utility function.

Suppose that A and B are not selling X, but rather using it themselves (for simplicity, suppose that X is a widget that A and B can share without conflict). We know that X is worth at least 2 * U(5 hours). Suppose that 2 * U(5 hours) > U(8 hours). In this case, by my previous argument, it would be preferable for A to do all of the work, and B to barter something worth between U(8 hours) - U(5 hours) and U(5 hours) for his share of X.

Ultimately, this argument is just a rediscovery of the value of trade and specialization. To translate a minimum wage into this framework, we would define some artificial lower bound for the compensation A needs to be provided in a trade such as this. If this minimum value is less than U(8 hours) - U(5 hours) or U(5 hours), then we are just influencing how wealth gets distributed between A and B. However, if the minimum value to big, than the above trade is prohibited, even though we have seen that it is strictly beneficial.

>will this raise the price or decrease the monetary value of an hour of work?

What do you mean by "monetary value of an hour of work". Returning to a more realistic employer/employee example, there are two important monetary values: the value the employee gives to an hour of work, and the value the employer gives to an hour of work.

From the employer perspective, the value of an hour of work is V(X)/T, where V(X) is the value of X [1], and T is the time spent making it. V(X) is independent of how long it took to make, which means that as the work takes longer, the value of an hour goes down to the employer.

From the employee perspective, the issue is a question of their utility function. Assuming a reasonable utility function, I would expect the marginal value of an hour to increase to the employee. That is to say that the employee needs more money to be indifferent to working the last 2 hours than she does for any of the prior 2 hours. If this is the case, than the value of an hour to the employee goes up with the time.

[0] More formally, U(5 hours) is the equivalance class of objects for which the person would be indifferent to spending 5 hours of time to obtain.

[1] Or rather, V(X) is the labor-excluded profit of X.