To calculate the time spent on tasks/projects and the cost of these tasks/projects according to the time spent, as it is shown on the screenshot above, please, do the following steps:
- Create task group 'Projects'

- Create task groups 'Project 1', 'Project 2' within task group 'Projects'

- Create tasks within task groups 'Project 1', 'Project 2'

- Go to menu Tools and select Custom Fields

- Click on 'New' button in 'Edit custom fields' window

- Enter 'Time Spent' into Title field in 'Edit Custom Field' window

- Select 'Duration' in Type Field in 'Edit Custom Field' window

- Uncheck 'Required' option in 'Edit Custom Field' window

- Enter the below formula into 'Formula:' field in 'Edit Custom Field' window and click 'OK' button
$finish - $start

- Click on 'New' button in 'Edit custom fields' window

- Enter 'Cost' into Title field in 'Edit Custom Field' window

- Select 'Currency' in Type Field in 'Edit Custom Field' window

- Uncheck 'Required' option in 'Edit Custom Field' window

- Enter the below formula into 'Formula:' field in 'Edit Custom Field' window and click ‘OK' button
($cf_time_spent*24)*10.00

- Click 'OK' button in 'Edit custom fields' window

- Go to View menu, select option Columns, select option Task Tree Columns and activate option Time Spent and Cost

- Go to Task Tree tab

- Right click on a task group 'Projects' and select option 'Custom fields options'

- Select 'Time Spent' field in 'Edit custom field options for 'Projects' window

- Select 'Subgroups&Tasks' option in 'Settings For:' field in 'Edit custom filed options for 'Projects' window

- Select 'Enable' option in 'Field: Time Spent' in 'Edit custom filed options for 'Projects' window

- Select 'Aggregated (for taskgroup)' in checked 'View in preview sections' option

- Select 'Sum' and 'Time Spent' in drop down lists in option 'Aggregated (for taskgroup)'

- Select 'This task group' option in 'Settings For:' field in 'Edit custom filed options for 'Projects' window

- Select 'Enable' option in 'Field: Time Spent' in 'Edit custom filed options for 'Projects' window

- Select 'Aggregated (for taskgroup)' under checked 'View in preview section' option and click 'OK' button in 'Edit custom filed options for 'Projects' window

- Select 'Sum' and 'Time Spent' in drop down lists in option 'Aggregated (for taskgroup)'

- Select 'Cost' field in 'Edit custom filed options for 'Projects' window

- Select 'Subgroups&Tasks' option in 'Settings For:' field in 'Edit custom filed options for 'Projects' window

- Select 'Enable' option in 'Field: Cost' in 'Edit custom filed options for 'Projects' window

- Select 'Aggregated (for taskgroup)' under checked 'View in preview section' option

- Select 'Sum' and 'Cost' in drop down lists in option 'Aggregated (for taskgroup)'

- Select 'This task group' option in 'Settings For:' field in 'Edit custom filed options for 'Projects' window

- Select 'Enable' option in 'Field: Cost' in 'Edit custom filed options for 'Projects' window

- Select 'Aggregated (for taskgroup)' in checked 'View in preview section' option in 'Edit custom filed options for 'Projects' window

- Select 'Sum' and 'Cost' in drop down lists in option 'Aggregated (for taskgroup)'

- Click 'OK' button in 'Edit custom filed options for 'Projects' window