The Task Assignment page is the actual cost snapshot that is taken at the time the transaction is posted into the project.
If the posting comes from timesheets, it determines the rate from the rate matrix at the time of the posting and is not changed if rates change. If the posting comes from 'import financial actuals' job, then it is the actual cost coming from the financial module if there is a new transaction from financial side or there was a WIP adjustment on an existing transaction.
The 'Actuals by Transaction Type' actual cost is the current actual cost directly from WIP.
The Project 'Actual Cost' is not always the real actual cost. The number that you should rely on should always come from the financial module. The best place to see actual costs is in a cost plan or through the 'Actuals by Transaction Type' portlet or any other portlet or report that uses the WIP data to show actual costs.
There are existing Knowledgebase articles and community articles that talk about how the Project Actual Cost value may not provide the exact actual cost due to the way it is determined by timesheet posting, baselines, incorrect rate matrix at time of posting.