So in your example, you have a found set of 6 records and the costs, from first record to last are the values shown?
Working from a found set, you have two options:
A Loop through the found set building your list one value at a time in the variable.
Use a dedicated layout of just the cost field and then copy all records can copy these values as a return separated list of costs. This can then be pasted into a field and a simple calculation can replace the returns with commas. Note: a return separated list can be easier to work with in many cases, though a comma delimitted can be useful for display on your layout.
The looping script:
Go to Record/Request/page [first]
Set Variable [$List ; value: $List & TableA::Cost & ","]
Go to Record/Request/Page [next ; exit after last]
Set Field [$List ; value: Left ( $List ; Length ( $List ) -1 ) //strip off the extra comma]