In that they are both Windows 7, whoever told you that is correct, but there are important differences too.  Dell media is intended to be installed on a Dell computer and activate automatically, without the need for manual entry of Product Key.  HP is designed to do the same thing ... on an HP machine.  There is a good chance that it wouldn't accept the Dell Product Key either ... even if it did install successfully.  Also, most OEM media will not even install on other than a matching machine (HP disks will not usually install on Dell, vice versa).
I just purchased a refurbished Dell Optiplex 745 with Windows 7 Pro.  It came with a HP Windows 7 Pro re install disk and when I questioned them about this they stated that a HP re  install disk is identical to a Dell disk.  Is this true and if it is not what problems will it create if I have to re install Windows 7.
Dell optiplex 745 with Windows 7 Pro