you can use catalog_product_load_after event to change price in product detail page
<catalog_product_load_after>
<observers>
<custom_checkout_observer>
<type>singleton</type>
<class>Custom_Custom_Model_Observer</class>
<method>loadaftercatalog</method>
</custom_checkout_observer>
</observers>
</catalog_product_load_after>
In observer.php,
public function loadaftercatalog($observer)
{
$oldprice = 0;
$product = $observer->getEvent()->getProduct();
$oldprice = $product->getPrice();
$newprice = 20 + $oldprice;
$categoryIds = $product->getCategoryIds();
foreach($categoryIds as $categoryId){
if($categoryId == 5){
$product->setPrice($newprice);
}
}
return $this;
}