Run the following query under context of any system or user database to get the sql server database engine account and the account for sql server agent.
select
[servicename]
,[startup_type]
,[startup_type_desc]
,[status]
,[status_desc]
,[process_id]
,[last_startup_time]
,[service_account]
,[filename]
,[is_clustered]
,[cluster_nodename]
from [sys].[dm_server_services]