P(x) = 13,000x - 10,000,000
John's cost is the sum of fixed costs ($10,000,000) and variable costs ($7000·x).
John's revenue is the amount he gets from selling boats ($20,000·x).
The profit John realizes is the difference between revenue and cost:
... P(x) = revenue - cost
... P(x) = 20,000x -(10,000,000 +7000x) . . . . . use the expressions for each
... P(x) = 13,000x -10,000,000 . . . . . . . . . . . . . simplify