The relevant SpaceX cost section:
It's instructive to compare these costs with those of SpaceX's Crew Dragon program, which started flying astronauts in 2020. All of NASA's contracts with SpaceX for a similar scope of work on the Crew Dragon program totaled more than $3.1 billion, but any expenses paid by SpaceX are unknown because it is a privately held company.
While any expenses are unknown, it is important to note that SpaceX has sought out other customers in addition to NASA for Crew Dragon (Inspiration4, Axiom, Polaris), whereas Boeing has... not done that. While we can't know the internal profitability of Dragon, it seems fair to assume that the program is not operating at a loss.