Indeed! You will be penalized (and removed from their database) when the duplicate is detected.
I’m sure you’d rather have your otherdomain.com visited directly rather than via a subdirectory of domain.com so simply use a 301 redirect to make that happen, e.g.:
RewriteEngine on
RewriteCond %{HTTP_HOST} !www\\.otherdomain\\.com [NC]
RewriteRule .? http://www.otherdomain.com%{REQUEST_URI} [R=301,L]